DNS

TXT record splitter

Split a long TXT record value into properly quoted 255-byte character-strings, or the one value a panel that auto-joins would want.

Free, no accountIn your browser

Paste the whole value, however long. Nothing you type here is stored.

Only used to label the "At" line below - it does not change how the value is split.

Try

Result

Nothing to split yet

Paste the value you need to publish and it is split as you type.

What this is

This tool will split long txt record values into the 255-byte-or-less character-strings RFC 1035 section 3.3 defines, quoted and escaped the way a DNS panel or zone file expects, with a multi-byte character always kept whole rather than torn across two strings.

A TXT record is not one long string on the wire - RFC 1035 section 3.3 defines it as one or more character-strings, each a single length byte followed by up to 255 bytes of data. A 2048-bit DKIM key, a long SPF record with several includes, or any value over 255 bytes has to be broken into more than one character-string to be published at all, which is what this tool does.

For why TXT is the one record type SPF, DKIM and domain-verification strings all share, rather than each getting its own, see our blog guide "The DNS records a domain needs, and what each one actually does."

How to read the result

The quoted-strings form is what a panel or zone file expecting pre-split input wants: each character-string wrapped in its own quotes, with any literal quote or backslash inside escaped. The single-value form is the same data with no quotes or splitting, for a panel that does its own splitting once you paste a whole value. The byte count beside each string is there so a boundary landing exactly at 255, or a multi-byte character moved whole into the next string, is visible rather than silent.

Common mistakes

What goes wrong most often, and how to tell.

  • Splitting on characters instead of bytesA string's character count is not the same as the byte count RFC 1035 limits a character-string to - an accented letter or emoji can be several bytes, so splitting on characters can quietly produce a string over the real 255-byte limit.
  • Forgetting to escape a literal quote or backslash in the valueRFC 1035 section 3.3 requires a literal quote or backslash inside a character-string's data to be preceded by a backslash. Leaving one unescaped breaks the quoting a parser relies on to find where the string actually ends.

Questions

What people ask about this tool.

  • RFC 1035 section 3.3 defines a TXT record as one or more character-strings, and each one can hold at most 255 bytes on the wire - a 2048-bit DKIM key or a long SPF record routinely runs past that single string, which is why the format allows several strings concatenated together.
  • It depends on your provider. Some panels and zone files want the value pre-split into quoted strings exactly as this tool shows them; others auto-split whatever you paste as one block. This tool shows both forms so you can use whichever yours expects.
  • It is never torn in half. This tool counts the UTF-8 bytes of the real value, not characters, and moves a multi-byte character whole into the next string rather than splitting its bytes across two - the finding above says when that happened.
  • That is RFC 1035 section 3.3's own escaping rule for a character-string: a literal quote or backslash inside the data has to be preceded by a backslash so a parser can tell it apart from the quotes that wrap the whole string.

Sources

Every fixed value here comes from the provider’s own documentation. These pages change, so each says the day it was last read.

Use it from the API

The same check, as one request.

Request
curl -X POST https://resellerhq.com/api/tools/txt-record-splitter \
  -H "Content-Type: application/json" \
  -d '{"value":"v=spf1 include:example.com ~all","name":""}'
Response
{
  "tool": "txt-record-splitter",
  "input": {
    "value": "v=spf1 include:example.com ~all",
    "name": ""
  },
  "result": {
    "verdict": {
      "tone": "success",
      "headline": "1 string · 31 bytes",
      "summary": "This value fits in one character-string; no splitting is needed."
    },
    "findings": [
      {
        "id": "counts-bytes-not-characters",
        "severity": "info",
        "title": "Split on UTF-8 bytes, not characters",
        "detail": "This value is 31 bytes across 31 characters. Every split below is measured in bytes, and a multi-byte character is always moved whole into the next string rather than having its bytes divided between two."
      },
      {
        "id": "panels-disagree-on-form",
        "severity": "info",
        "title": "Your DNS panel may want one form and not the other",
        "detail": "Some providers want a long TXT value pasted as separate pre-split quoted strings; others auto-split whatever you paste as one block. Both forms below carry the same data - use whichever your own panel expects."
      },
      {
        "id": "fits-in-one-string",
        "severity": "pass",
        "title": "Fits in a single 255-byte character-string",
        "detail": "At 31 bytes, this value needs no splitting at all - publish it as the one string below."
      }
    ],
    "parts": [
      {
        "kind": "meter",
        "label": "Bytes in this string",
        "value": 31,
        "max": 255,
        "tone": "neutral",
        "note": "RFC 1035 §3.3 caps one character-string at 255 bytes."
      },
      {
        "kind": "record",
        "title": "Quoted strings (for a panel or zone file expecting them pre-split)",
        "value": "\"v=spf1 include:example.com ~all\"",
        "note": "Paste exactly as shown, including every quote - each quoted pair is one 255-byte-or-less character-string."
      },
      {
        "kind": "record",
        "title": "Single value (for a panel that splits automatically)",
        "value": "v=spf1 include:example.com ~all",
        "note": "Paste this as one block. A panel that pre-splits for you will produce the same bytes shown above."
      },
      {
        "kind": "table",
        "title": "Each string, by byte length",
        "columns": [
          "#",
          "Bytes",
          "String"
        ],
        "mono": [
          2
        ],
        "rows": [
          [
            "1",
            "31",
            "\"v=spf1 include:example.com ~all\""
          ]
        ],
        "proseColumns": [
          2
        ],
        "note": "Every row holds at most 255 bytes; a row shorter than that before the last one means a multi-byte character was moved whole into the next row."
      }
    ],
    "limits": [
      "Different DNS providers' panels disagree on whether they want the value pre-split or whole - some auto-split themselves. Check which form your own panel expects before publishing either one above."
    ]
  }
}

Resell the domains these records point at, at your own price, under your own brand.

Get started

Company names and logos are trademarks of their owners, shown only to identify each service.