JSON vs TOON: What the Trade-offs Actually Are
JSON is the default way to move structured data around the web, and it is not going anywhere. But when you start sending large amounts of data into a language model, you pay for every token, and JSON spends a lot of them on repetition. TOON is a newer format built to cut that waste. It is not a JSON replacement; it is a tool for one specific job. Here is what it does and when it earns its place.
The problem TOON addresses
Look at a JSON array of objects and you will notice the same field names repeated on every row:
[{"id":1,"name":"Ann","role":"admin"},{"id":2,"name":"Ben","role":"user"}]
Every id, name and role is written again and again, along with
braces, quotes and commas. For a handful of rows that is fine. For a few thousand rows sent to a model,
those repeated keys and symbols become a meaningful chunk of your token budget, and your cost.
What TOON does differently
TOON keeps the same information but writes the field names once, then lists the values in a compact, table-like layout, much closer to how a spreadsheet stores rows. The repeated keys disappear, the punctuation thins out, and the token count for uniform data drops noticeably. The data is identical; only the packaging is leaner. You can see the effect by running a sample through the JSON to TOON converter and comparing the two side by side.
Think of TOON as JSON with the duplicate labels removed for a table of records. Same data, fewer tokens, and that helps precisely at the model boundary, where tokens cost money.
Where the savings are real
TOON shines on uniform, tabular data, the large arrays of objects that all share the same keys. That is exactly the shape where JSON's repetition is worst, so it is where TOON cuts the most. If you are passing rows of records, logs or search results into a model as context, TOON can trim a real slice of the prompt.
Where plain JSON still wins
- Irregular or deeply nested data. When records do not share a clean set of fields, there is little repetition to strip, and the compact layout can become harder to follow.
- Storage and APIs. JSON is the universal interchange format. Almost every language, database and tool reads it without a second thought; TOON does not have that reach.
- Anything a human will debug. JSON's explicit keys make it easy to scan and validate, which is why it stays the right choice for config and logs.
A simple rule
Keep your data as JSON everywhere it is stored or exchanged. Convert to TOON only at the last step, when you are about to hand a large, uniform dataset to a model and want to spend fewer tokens doing it. If you are cleaning up the JSON first, a JSON formatter makes it easy to confirm the structure is valid before you convert.
Frequently asked questions
What is TOON?
TOON is a compact, token-oriented way to write structured data. It keeps the same information as JSON but removes repeated keys and punctuation, which lowers the token count when the data is sent to a language model.
Does TOON replace JSON?
No. JSON is the interoperable standard that almost every system reads and writes. TOON is a niche optimisation for feeding uniform, table-like data to language models cheaply. Use JSON for storage and APIs, and reach for TOON only at the model boundary.
When does TOON save the most?
When you have a large array of objects that all share the same fields, like rows in a table. The repeated keys in JSON are exactly what TOON strips out, so uniform data sees the biggest reduction.
When is plain JSON the better choice?
For deeply nested or irregular data, for anything stored or exchanged between systems, and any time broad compatibility matters more than token count. JSON's verbosity buys you universal tooling and support.