Productivity and Utilities

DNS TXT Record Splitter

Paste a long TXT value to split it into strings, or paste quoted strings to join them.

To split, paste the whole value. To join, paste the quoted strings. Up to 100,000 characters. Nothing is uploaded.

Used when splitting. 255 is the most one string can hold.

A TXT record is a list of strings, and each string can hold at most 255 bytes. A long value such as a DKIM key is stored as several quoted strings that a resolver joins end to end, so the pieces must not add or drop any characters. This tool cuts the value at the length you choose without splitting a multi-byte character, puts each piece in double quotes and escapes any quote or backslash inside it. Joining reads the quoted strings, understands the escapes \" , \\ and \DDD, and returns the value. Some DNS hosts split long values for you, and others want the quoted form, so check what your host expects. Nothing is uploaded from this page.

Next step

How to use the dns txt record splitter

  1. Choose Split into strings, then paste the whole TXT value, such as a DKIM record, in the box.
  2. Choose the longest string. 255 bytes is the most that one string can hold.
  3. Choose one line or one string per line, and tick Remove line breaks if the value was copied across several lines.
  4. Copy the quoted strings. To go the other way, choose Join strings and paste the quoted strings.

Formula

Each string is at most 255 bytes (a one-byte length followed by the text)

A quote inside a string is written \" and a backslash is written \\

The record value is all strings joined end to end with nothing between them

Characters outside ASCII take more than one byte, and a character is never cut in two.

A 282 byte DKIM style value

The sample value starts with v=DKIM1; k=rsa; p= and continues with a long run of base64 text, 282 bytes in all. At 255 bytes it becomes two strings, the first with 255 bytes and the second with the remaining 27 bytes, written as "first string" "second string".

With a longest string of 128 bytes the same value becomes three strings of 128, 128 and 26 bytes, and with One string per line each is on its own line. Pasting those strings back with Join strings gives the 282 byte value again.

Why a record needs splitting

Inside a DNS message, each string in a TXT record is stored with a length in a single byte, so no string can be longer than 255 bytes. A 2048-bit DKIM key written in base64 is about 400 characters, so it has to be stored as two strings. A resolver joins the strings back together without adding spaces, which is why the pieces must be cut exactly at the point where one ends and the next begins.

Some DNS hosts accept the whole value and split it for you. Others reject a value over 255 characters, and some want the quoted strings typed in. Check the help pages of your host, and look at the record with a lookup tool after you save it.

Quotes, escapes and spaces

A quote or a backslash inside a string must be escaped, and the tool does it for you. A space between two quoted strings is only a separator in the zone file and is not part of the value, so a key split across two strings has no space in the middle. If your value has a space that matters, such as the one after the semicolon in v=DKIM1; k=rsa, it stays inside the string where you put it.

See also the SPF Record Parser, the DMARC Record Builder and Parser, the Base64 Encoder and Decoder for the key text and the Quoted-Printable Encoder and Decoder for another email encoding.

Assumptions and limits

  • The limit of 255 bytes is for one string. The whole record can be longer, up to the size of a DNS message.
  • Non-ASCII characters are kept as typed. Many DNS hosts expect plain ASCII.
  • The sample key is made up and is not a working key.
  • Line breaks are removed from the value only when the box is ticked.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Do I need quotes in my DNS panel?

It depends on the host. Some add the quotes themselves and some want them typed. Try the quoted form first and look at the saved record to see.

Why 255 and not 256?

The length is stored in one byte, which holds 0 to 255, so 255 is the largest length that fits.

Does splitting change the value?

No, as long as the pieces are joined end to end with no added characters. Joining the strings returns the original value.

Can I split into shorter pieces?

Yes. Choose 200 or 128 bytes. Shorter pieces are accepted everywhere that accepts the longer ones.