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
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 isSPF_NOT_SPF_RECORD. - Terms: every mechanism with its qualifier and value, and the
redirectandexpmodifiers. - Syntax: unknown mechanisms, bad addresses and prefixes, and invalid domains, each as
SPF_SYNTAX_ERROR. - Policy: the
allmechanism, 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
| Input | SPF record |
|---|---|
| Deadline | 2 seconds |
| Freshness | Computed from the input; nothing is looked up |
| Price | $0.002 per check |
Findings this tool can report
SPF (9)
- Info
SPF_MACRO_NOT_EVALUATEDAn SPF record contains macros that were not evaluated. - Warning
SPF_NEUTRAL_ALLThe SPF policy ends with ?all. - Error
SPF_NOT_SPF_RECORDThe text is not an SPF record: it does not start with v=spf1. - Warning
SPF_NO_ALLThe SPF record has no all mechanism and no redirect. - Error
SPF_PASS_ALLThe SPF policy ends with +all. - Warning
SPF_PTR_MECHANISMAn SPF record uses the ptr mechanism. - Info
SPF_SOFTFAIL_ALLThe SPF policy ends with softfail (~all). - Error
SPF_SYNTAX_ERRORAn SPF record contains a term that cannot be parsed. - Error
SPF_TOO_MANY_LOOKUPSThe SPF record needs more than 10 DNS lookups.
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.