Every few months a new format shows up claiming it will replace JSON. Most fade quietly. TOON is getting attention because it targets a real, current problem: tokens cost money.
In this JSON vs TOON comparison, I’ll explain what TOON is, show the same data in both formats, and give my honest take on whether JSON is finished. I haven’t benchmarked TOON myself, so the examples below are illustrative.
What Is TOON (Token-Oriented Object Notation)?
TOON stands for Token-Oriented Object Notation.
It isn’t a database format or an API format. It does one job: putting structured data into an LLM prompt cheaply.
Why JSON Costs So Many Tokens
JSON is verbose by design. Every object repeats its keys, and every key needs quotes, a colon and a comma.
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" },
{ "id": 3, "name": "Carol", "role": "user" }
]
}
The keys id, name and role appear three times each. With 1,000 users, that’s 1,000 repeats. Parsers don’t care. But LLM providers bill per token, and the braces, quotes and repeated keys all add up.
The Same Data in TOON
users[3]{id,name,role}:
1,Alice,admin
2,Bob,user
3,Carol,user
Here’s how to read it:
users[3]is an array nameduserswith 3 items.{id,name,role}declares the field names once.- Each indented line below is one row of values.
That’s the core idea: when many objects share the same shape, declare the keys once and list only the values. It looks like CSV, but it keeps JSON’s structure and includes the array length, which can help a model notice truncated data.
Simple objects use indentation instead of braces:
user:
id: 123
name: Ada
tags[2]: dev,sre
JSON vs TOON: Side-by-Side Comparison
| JSON | TOON | |
|---|---|---|
| Purpose | General data exchange | Compact LLM prompt input |
| Repeats keys per object | Yes | No (for uniform arrays) |
| Readable by humans | Yes | Yes |
| Native support in languages and browsers | Everywhere | Needs a library |
| Best for | APIs, storage, config | Large uniform lists in prompts |
Does TOON Actually Save Tokens?
It depends on the shape of your data. A format like TOON has the most to gain on large, uniform arrays of objects, where JSON repeats the same keys over and over. On small or deeply nested data, the gap is small.
Token counts also depend on the tokenizer, which differs between models. The only reliable method is to measure your own data with your own model’s tokenizer.
So, Is JSON Finished?
No. Here’s my reasoning:
- TOON solves a narrow problem. It optimizes LLM input, not storage, APIs or config files.
- JSON’s ecosystem is huge. Every language, browser, database and API gateway speaks JSON natively. TOON would need years to get close.
- Reliability is the real test. Whether a model reads TOON as accurately as JSON on your task is something to test, not assume.
- Pricing and context windows keep changing. The cheaper and larger context gets, the less a format like this matters.
My view: TOON is a useful optimization layer, not a replacement. Think of it like minifying JavaScript before shipping. You keep writing and storing JSON, then convert at the edge, right before the prompt is built.
When I’d Use TOON (and When I Wouldn’t)
Good fit
- Large, uniform lists (logs, users, products, metrics) going into prompts
- High-volume LLM calls where token cost is a real line item
Poor fit
- Deeply nested or irregular data, where the tabular trick doesn’t apply
- Anything not going to an LLM: APIs, storage, config, message queues
- Small payloads, where savings are negligible
Pitfalls and What I’d Do Differently
- Don’t trust headline percentages. Measure with your own data and tokenizer.
- Test accuracy, not just cost. A cheaper prompt that makes the model misread a field is a bad trade.
- Keep JSON as your source of truth. Convert to TOON only when building the prompt, so nothing downstream breaks.
FAQ: JSON vs TOON
What does TOON stand for?
Token-Oriented Object Notation, a compact format designed to represent JSON-style data using fewer tokens in LLM prompts.
Does TOON replace JSON?
No. It’s an optimization for LLM input. JSON remains the standard for APIs, storage and configuration.
Is TOON always cheaper than JSON?
No. Savings are largest on large, uniform arrays of objects and smallest on small or deeply nested data. Measure with your own tokenizer.
Summary
- TOON (Token-Oriented Object Notation) is a compact format for sending structured data to LLMs.
- It saves tokens by declaring keys once for uniform arrays instead of repeating them.
- The benefit is biggest for large, tabular data and small for nested or irregular data.
- JSON isn’t finished. TOON is an optimization at the prompt edge, not a replacement.
- Measure token cost and model accuracy on your own data before adopting it.
