DNS TXT record splitter: how do you split a long TXT record into 255-octet chunks?
How does this check work, and what does the result tell you?
AdminKit's TXT record splitter reads the long value you paste — a DKIM p= key, an SPF record, a DMARC, MTA-STS or TLS-RPT value, or any other TXT text — entirely in your browser, counts its length in real UTF-8 octets, and splits it into correctly quoted, escaped 255-octet character-strings ready to paste into a zone file or DNS provider.
Part of the Email authentication cluster — more tools, guides and terms on email authentication.
Split entirely in your browser — nothing you paste is sent to AdminKit or anywhere else, and this tool never queries DNS, never publishes anything, and never checks what the value actually means.
What the result means
Each "String N" entry is one DNS <character-string>, <=255 octets, exactly as it will sit on
the wire. The zone-file form below it is what to paste into a provider's TXT field or a raw zone file — the
quotes and any escaped "/\ characters are the zone-file syntax, not part of the
record's actual value.
Next step
Paste the zone-file form above into your DNS provider or zone file as the TXT record's value, then confirm it published correctly with AdminKit's DNS lookup.
Keep this result
Copy a link to this check so you can share it or run it again later. Want a heads-up when this result changes? Talk to our team and we'll set it up for you.
How it works and limits
Paste the TXT value below and this tool counts its length in real UTF-8 octets, splits it into <=255-octet chunks on whole-character boundaries, and shows each chunk alongside the concatenated, correctly escaped zone-file form — entirely in your browser, with nothing you paste sent to AdminKit or anywhere else. It only reformats the text you give it: it never queries DNS, never publishes anything, and never checks whether the record you’re splitting is itself valid SPF, DKIM or DMARC syntax.
When does a TXT value actually need splitting into multiple strings?
Only once it passes 255 octets — the limit RFC 1035 §3.3.14
sets for a single <character-string> in the DNS wire format; a TXT record (type 16 in IANA’s
DNS parameters registry) can carry several
such strings. A short SPF record or a BIMI
pointer usually fits comfortably in one string and needs no splitting at all. A DKIM p= public
key is the most common value to actually hit the limit: RFC 6376 §3.6.1
says plainly that “if the public key data … is long enough that it will not fit within the
255-octet limit, … it can be split into multiple strings.” AdminKit’s
DKIM record generator already does this splitting for the record it
builds; this tool does the same job for a value you already have from somewhere else — a key your
mail provider gave you, a record you’re migrating from another DNS host, or any other long TXT
string you need to paste into a zone file by hand. DNS hosts document the same rule for their own forms: Amazon’s
Route 53 guide to supported record types says a single TXT string can hold up to 255 characters and that a
longer value must be broken into strings of 255 characters or fewer, each enclosed in double quotation marks.
Why count bytes (octets) instead of the number of characters I see on screen?
Because that is what RFC 1035’s limit actually measures. Plain ASCII text has one octet per
character, so the distinction doesn’t matter for most SPF and DMARC records. It matters a great
deal the moment a value contains non-ASCII text — a company name in a n= note, an accented
domain, or any character outside the basic Latin set — because each of those characters can take
two to four UTF-8 octets, not one. A tool that counts JavaScript string length instead of real
UTF-8 bytes will under-count a multibyte value and let it through under 255 “characters” when it is
already over 255 real octets on the wire.
How to read the results
- Input length — the value’s size in UTF-8 octets, then either “fits in a single 255-octet character-string, no splitting needed” or “over the 255-octet limit … split into N quoted strings”.
- Character-strings — one box per chunk, “String 1”, “String 2” and so on, each with its octet count and its quoted text. Chunks break only between whole characters, so a multi-byte character is never cut in half and a chunk can end a few octets short of 255.
- Zone-file form — every quoted string joined by single spaces: the text to paste into a zone file or a DNS provider’s TXT field. Copy zone-file form puts it on your clipboard.
The octet counts are for the value itself. The backslashes added to escape " and \ are zone-file syntax and do
not count.
Examples
| Value pasted | Input length | Strings | What it means |
|---|---|---|---|
v=spf1 include:_spf.example.com -all | 36 octets | 1 (36) | Fits in one string; no splitting needed. |
The widget’s long DKIM example (v=DKIM1; k=rsa; p=…) | 370 octets | 2 (255 + 115) | Publish both quoted strings in one TXT record; resolvers join them. |
250 × a followed by 5 × é | 260 octets (255 characters) | 2 (254 + 6) | Each é is 2 octets; the split falls before a character, not inside it. |
say "hi" C:\tmp | 15 octets | 1 | Shown as "say \"hi\" C:\\tmp": the quote and backslash are escaped. |
Limits
- This tool only reformats the text you paste. It does not query DNS, does not publish anything, and has no way to tell whether the value you gave it is actually correct SPF, DKIM, DMARC, MTA-STS or TLS-RPT syntax — for that, use AdminKit’s SPF check, DKIM check or DMARC check once the record is live.
- Many DNS providers accept a long, unsplit TXT value directly in their control panel and chunk it for you automatically when they write the zone — this tool is for the cases where you’re editing a raw zone file yourself or your provider doesn’t do that chunking for you. Cloudflare’s DNS record types reference notes that TXT content is one or more strings delimited by double quotes and that it adds the quotes itself when you save content without them, so check how your provider treats quotes before pasting the quoted zone-file form.
- Splitting is purely mechanical: it does not check that the pieces you end up with are themselves meaningful, only that each one is <=255 octets and that they concatenate back to exactly what you pasted.
Once your record is split and published, confirm it resolved the way you expect with AdminKit’s DNS lookup, or go back to whichever generator built the original value — SPF record generator, DKIM record generator or DMARC record generator — if you’re splitting a value you generated there and it already warned you a split was needed.
Frequently asked questions
Why does a DNS TXT record need to be split into multiple quoted strings at all?
Because the DNS wire format defines a TXT record's value as one or more <character-string>s, and RFC 1035 §3.3.14 limits each <character-string> to 255 octets — there is no single-string exception for a longer value. A DKIM public key or a long SPF record routinely exceeds 255 octets on its own, so it has to be presented as several back-to-back quoted strings, which concatenate into the original value once the record is parsed.
Do I always need to split a long TXT value myself before publishing it?
No — many DNS providers' control panels accept the long, unsplit value directly and do the 255-octet chunking for you behind the scenes when they write the zone. Splitting it yourself matters when you're editing a raw zone file, using a provider whose UI rejects or silently truncates a value over 255 characters, or want to see exactly what will be sent over the wire before you paste it anywhere.
Why does this tool count octets instead of just the number of characters I typed?
RFC 1035's 255 limit is on octets — bytes on the wire — not on characters, and the two are only the same number for plain ASCII text. A single accented letter, CJK character or emoji can take 2-4 UTF-8 bytes, so a value that looks like 240 characters in a text editor can already be well past 255 octets; counting characters instead of bytes would silently under-split it.
What happens to a double quote or backslash that's already inside my TXT value?
RFC 1035 §5.1's master-file (zone file) syntax uses a backslash to escape the next character, so a literal double quote has to be written as \" and a literal backslash as \\ inside a quoted character-string — otherwise the quote would end the string early or the backslash would be read as the start of an escape sequence. This tool escapes both automatically in the quoted and zone-file forms it shows you.
Should I paste the value with or without its quotes?
Without. The tool treats everything you paste as the record's value, so a record that is already in zone-file form, such as "v=spf1 -all" with its quotes, comes back as "\"v=spf1 -all\"" with the quotes escaped as part of the text. Spaces and line breaks are kept as typed too, so paste only the value itself.