dotvitals

TXT Record Generator

Build a correctly formatted and escaped DNS TXT record for verification, SPF or any custom value.

This is the zone the TXT record goes in — usually the domain the service asked you to prove you own. The exact name it sits at, bare or prefixed, comes later.

About the txt record generator

TXT records hold arbitrary text under a DNS name, which makes them the general-purpose record type used for everything from SPF and domain verification codes for third-party services to DKIM keys and miscellaneous machine-readable data that does not fit an existing record type. This generator formats the record correctly and handles the escaping DNS TXT content requires. Long values, or values containing characters like quotation marks and backslashes, need specific escaping and, past 255 characters, need to be split across multiple quoted strings within a single record; getting this wrong is a frequent cause of a value that looks right when typed but fails verification once queried back.

It supports common presets for domain verification services, such as the specific TXT format Google Search Console, Microsoft 365 and various SaaS platforms expect for proving domain ownership, alongside a fully custom mode for any name and value pair you need to publish. Because a domain can carry many TXT records at once, and some services search for a specific prefix or exact match, the generator also flags when a new record's name would collide with, rather than sit alongside, one you may already have published, such as an existing SPF record at the same name.

Because a domain can accumulate many TXT records over time from different services, periodically reviewing what is actually published, and removing entries for services that are no longer in use, keeps the zone easier to audit and reduces the chance of a future naming collision. A periodic cleanup pass, done alongside a routine DNS review, is a small habit that keeps a growing zone easy to reason about instead of accumulating years of forgotten, undocumented entries.

Common questions

What is a TXT record used for?
Anything that needs arbitrary text published under a DNS name: SPF and DKIM values, domain ownership verification codes, and various other machine-readable data.
Why does my value need to be split into multiple strings?
A single DNS TXT string is limited to 255 characters. Longer values must be split across multiple quoted strings within one record, which the generator handles automatically.
Which verification services are supported?
Presets are included for common services like Google Search Console and Microsoft 365 domain verification, plus a fully custom mode for any name and value you need.
Can I have two TXT records at the same name?
Yes, DNS allows multiple TXT records at one name, but some protocols, notably SPF, explicitly require exactly one; the generator warns you when adding a record would create a conflict like that.