TOON vs JSON

Both formats carry the same data model, so the comparison comes down to three practical questions: how many tokens does each burn, how reliably do models read them, and how well does your tooling support them.

Token cost

On uniform arrays of objects — the shape of most data you actually paste into prompts — published benchmarks and the format's own test suite consistently show TOON using 30–60% fewer tokens than formatted JSON. The savings shrink toward zero for small, deeply-nested or irregular payloads, and TOON can even be slightly larger there. Don't take a headline number: paste your payload into the converter and read the receipt.

Model accuracy

Independent benchmarks (including an arXiv study of plain and constrained decoding) find models parse TOON at least as accurately as JSON on tabular data — the explicit field header and row count give the model structure to check itself against. For generation (asking the model to output a format), JSON still has the edge in tooling: schema validators, function-calling modes and constrained decoding are built around it.

Rule of thumb

  • Sending large tabular context to a model → TOON, measure the savings.
  • Model output you must validate against a schema → JSON.
  • Config files, tiny objects → whichever your team reads faster; savings are marginal.
  • Public APIs → JSON. TOON is a prompt-side optimization, not a wire format.

Try it on your data

The JSON to TOON converter prints exact token counts for both formats with the o200k and cl100k tokenizers, plus the dollar difference at current model prices — all client-side.