InputTestHub

SPF Record Generator

Builds an SPF record from your mail sources and counts the DNS lookups as you go, so you see the ten-lookup limit before you publish.

Developer Nothing uploaded No sign-up Free, unlimited
Developer tool
Space or comma separated. Each costs at least one lookup.
These cost no DNS lookups at all.
Fill in the fields and press Generate.
In short An SPF record is a single DNS TXT record on your domain that lists which servers may send mail using it. It starts with v=spf1, lists sources as include:, mx, a, ip4: or ip6:, and ends with an all mechanism — usually ~all while testing and -all once you are confident. Only one SPF record may exist per domain; publishing two is a permanent error that breaks both. The SPF Record Generator on inputtesthub.com assembles the record from your providers and shows the running DNS lookup count against the limit of ten, which is the constraint that decides whether a record works.

How to use the SPF Record Generator

  1. Tick the services that send mail as your domain.
  2. Add any other includes or IP ranges.
  3. Watch the lookup count stay under ten.
  4. Publish it as a TXT record on the domain itself.

About the SPF Record Generator

The SPF Record Generator builds an SPF record from your mail sources and counts the DNS lookups as you go, so you see the ten-lookup limit before you publish. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Publishing SPF for a domain for the first time.
  • Adding a new sending service without breaking the record.
  • Replacing includes with IP ranges to get back under the limit.

Details

Publish atThe domain itself, as a TXT record
Records per domainExactly one
Lookup limit10
ip4 and ip6Cost no lookups — use them when a provider publishes ranges
Start with~all, then tighten to -all
The lookup counter is the point of this generator rather than the record text, which is easy enough to type. Watching the number climb as providers are ticked shows immediately why a record with five services is close to unpublishable, and why the answer is usually IP ranges rather than more includes.

Where this tool stops

Cannot discover which services send on your behalf. That list comes from DMARC aggregate reports, which is why publishing DMARC at p=none first and SPF second is the order that works.

Frequently asked questions

Can I have two SPF records?
No, and this is the mistake that breaks more domains than any other. RFC 7208 allows exactly one TXT record beginning <code>v=spf1</code>. If a second is added — usually when a new supplier says "add this record" — receivers see two and return a permanent error, so both fail. Merge the new mechanisms into the existing record instead.
Where exactly does the record go?
On the domain itself, not on a subdomain called spf. In most DNS panels that means a TXT record with the host set to <code>@</code> or left blank. A record at <code>spf.example.com</code> does nothing, because nothing looks there.
Should I use -all straight away?
No. Publish <code>~all</code>, publish DMARC at <code>p=none</code> at the same time, and read a fortnight of aggregate reports. They will name services you had forgotten — the invoicing system, the helpdesk, the office scanner. Fix those, then tighten.
Do I need SPF if I have DKIM?
You want both. DMARC passes if <b>either</b> SPF or DKIM passes and aligns, so having both means a message survives one of them breaking — and forwarding routinely breaks SPF while leaving DKIM intact.
Is there a limit on how often I can use the SPF Record Generator?
Free, unlimited, and no email address required. You can use it a hundred times a day and nothing changes.
Is the SPF Record Generator safe to use with private information?
No. The SPF Record Generator runs entirely in your browser using JavaScript. Because the work happens locally, the page also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
Who is the SPF Record Generator for?
The jobs it is built for: publishing SPF for a domain for the first time. Adding a new sending service without breaking the record. Replacing includes with IP ranges to get back under the limit. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the SPF Record Generator?
Cannot discover which services send on your behalf. That list comes from DMARC aggregate reports, which is why publishing DMARC at p=none first and SPF second is the order that works. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
Publish at is The domain itself, as a TXT record. Records per domain is Exactly one. Lookup limit is 10. These are printed on the page itself, so you do not have to take them on trust.
Can I use the SPF Record Generator on mobile?
Yes. The page is responsive and the page works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related developer tools

All 92
01

Cron Expression Generator

Builds a cron expression from plain choices — every N minutes, weekdays only, a specific time…

02

ASCII Table

A searchable ASCII and extended ASCII reference with decimal, hex, octal, binary and HTML…

04

MIME Type Lookup

Finds the MIME type for any file extension and the extensions matching any MIME type.

05

Port Number Lookup

Searchable reference of well-known and registered TCP and UDP ports and the services that use…

07

Random JSON Data Generator

Generates realistic mock JSON data — names, emails, addresses, dates, prices — from a schema…

09

HTML Entity Lookup

Searchable table of HTML entities with their named, decimal and hexadecimal forms and a live…

10

Meta Viewport Generator

Builds the correct viewport meta tag for responsive pages and explains what each property does.