SPF record parser

Reads one SPF record as text with the SPF check's parser (RFC 7208): version, mechanisms with qualifiers and values, modifiers, syntax errors and the all policy, and counts the terms that need DNS lookups. Includes are not followed; the SPF check on a domain does that.

Updated 2026-10-27

Free, no account, nothing is stored

What this tool checks

The record is read with the parser of the SPF check, following RFC 7208:

  • Version: the text must start with v=spf1; anything else is SPF_NOT_SPF_RECORD.
  • Terms: every mechanism with its qualifier and value, and the redirect and exp modifiers.
  • Syntax: unknown mechanisms, bad addresses and prefixes, and invalid domains, each as SPF_SYNTAX_ERROR.
  • Policy: the all mechanism, or the redirect that takes its place.

How to read the result

The findings are the SPF findings that the text alone can decide: SPF_PASS_ALL, SPF_SOFTFAIL_ALL, SPF_NO_ALL, SPF_PTR_MECHANISM and SPF_TOO_MANY_LOOKUPS when the record's own lookup terms already exceed ten.

Limitations

  • Includes and redirects are not followed, and macros are not expanded.
  • Findings that need DNS, such as a missing include target or a loop, come only from the SPF check.

Use it from code

API reference for SPF record parser

curl -i -X POST https://api.lookproof.dev/v1/mail/spf-parse \
  -H 'content-type: application/json' \
  -d '{"record": "v=spf1 mx include:_spf.example.com ~all"}'

A request without payment is answered with 402 Payment Required and the exact price. See the API reference.

Limits

InputSPF record
Deadline2 seconds
FreshnessComputed from the input; nothing is looked up
Price$0.002 per check

Findings this tool can report

SPF (9)

Frequently asked questions

How is this different from the SPF check?

The SPF check looks up a domain's published record and follows every include. The parser reads the text you paste, so you can check a record before you publish it. It uses the same parser and the same finding codes.

Why is the lookup count only an estimate?

Each include, a, mx, ptr, exists and redirect costs one DNS lookup, and the parser counts those in your record. The records behind each include can add more; only the SPF check on a published domain counts the whole tree.

Can I paste the record with quotes?

Yes. One pair of surrounding double quotes, as DNS tools often show TXT records, is removed and noted. A record split into several quoted strings must be joined first.