Why You Are Here
You are paying for tokens and want to pay less. Sending structured data to a language model costs money per token, and JSON is verbose by design.
You are hitting context window limits. More rows in the same window means better coverage on retrieval and analysis tasks.
You have read the claims and want to check them against your own data. Reasonable, and the sections below explain what the published figures actually measure.
What This Tool Does
The JSON to TOON Converter takes JSON and outputs the equivalent in Token-Oriented Object Notation.
Paste JSON and the tool returns TOON representing the same data. The conversion is lossless in both directions for the JSON data model.
What TOON Is
Token-Oriented Object Notation was created by Johann Schopplich and released in October 2025. It is a compact encoding of the JSON data model, designed specifically for putting structured data into language model prompts.
The core idea is removing repetition. In a JSON array of objects, every field name is repeated in every object. TOON declares the field names once and then lists the values as rows.
JSON:
[
{"id": 1, "name": "Ana", "role": "admin"},
{"id": 2, "name": "Ben", "role": "editor"},
{"id": 3, "name": "Cara", "role": "viewer"}
]
TOON:
[3]{id,name,role}:
1,Ana,admin
2,Ben,editor
3,Cara,viewer
Three field names appear once instead of nine times
Across a hundred rows, that difference compounds substantially.
The array length declaration is deliberate
TOON declares the array length and field list explicitly, which costs a few tokens and appears to improve model accuracy. The format's author attributes better comprehension to exactly this.
The Honest Version of the Token Savings
The figure quoted everywhere is 30 to 60 percent. That is a real range, and it is a best case rather than a typical one. What the comparison is against matters enormously.
|
Compared against |
Approximate saving |
|
Pretty-printed JSON |
~40% |
|
Compact JSON, no whitespace |
~25% |
|
YAML |
~38% |
If you are already sending minified JSON, your realistic saving is nearer a quarter than a half
Most published headline figures compare against pretty-printed JSON, which is the most verbose baseline available.
TOON also adds around 5% overhead
In field headers and array length declarations. That cost is deliberate, buying accuracy, but it is real and it eats into the saving on smaller payloads.
The saving scales with uniformity, not size
A thousand records with identical fields save enormously. A thousand records with different fields each save nothing, for reasons covered in When TOON Loses.
When TOON Loses
This is the part no other page covers, and it is the most useful thing here. TOON's saving comes entirely from declaring field names once. Where that is not possible, the mechanism does not apply and the overhead remains.
|
Your data |
Best format |
Why |
|
Uniform arrays of objects |
TOON |
Field names declared once, rows beneath |
|
Deeply nested structures |
YAML or JSON |
TOON has no advantage and adds overhead |
|
Non-uniform objects |
JSON |
No shared field list to factor out |
|
A single flat table |
CSV |
More compact still, if you need no structure |
|
Mixed shapes in one array |
JSON |
TOON falls back and gains nothing |
A February 2026 benchmark paper is blunt about the worst case
Stating that for deep hierarchies, complex state trees, DOM-like structures, and deeply nested configuration, TOON is not production-ready and conventional serialization should be used instead.
So the question is not should I use TOON but is my data tabular
Log rows, database records, product listings, and API result sets typically are. Configuration files, document trees, and nested application state typically are not.
Accuracy Went Up, Not Down
A result worth stating because the intuition runs the other way. Compression usually costs comprehension. With TOON it appears not to.
In a benchmark across four major models
TOON used 39.6% fewer tokens than JSON while scoring 73.9% accuracy against JSON's 69.7%. The format's author reports 99.4% accuracy on one model at 46% fewer tokens, across roughly 160 questions with semantic validation.
The proposed explanation is the explicit structure
Declaring the row count and field list up front gives the model a schema to check itself against, which appears to reduce errors rather than introduce them.
They come from a young format with a small body of independent testing, and results vary by data shape and model.
TOON Works Better as Input Than Output
A subtlety with real practical consequences, and one almost nobody mentions.
TOON was released in late 2025, so it does not appear in the training data of models trained before then
Models can read it, since the syntax is simple enough to follow from context, but they have not learned to produce it.
|
Direction |
Practicality |
|
Sending TOON to a model |
Works well, this is TOON's strength |
|
Asking a model to reply in TOON |
Requires a one-shot example in the prompt |
That example is prompt overhead
On a small response, the tokens spent teaching the format can exceed the tokens saved by using it. The benchmark paper testing generation found TOON viable in high-volume, in-domain pipelines where the schema is stable and the example cost amortises across many calls, and not otherwise.
The practical position
Convert your input data to TOON, and let the model reply in JSON, which it generates natively and which your parser already handles.
Measuring Your Actual Saving
Count tokens, not characters
Character count is not a reliable proxy, because tokenizers split text unevenly and formatting characters do not cost uniformly.
Use your target model's tokenizer
tiktoken for OpenAI models, Anthropic's tokenizer for Claude. Savings differ between tokenizers on the same input.
Test with your real payloads
Published benchmarks use their own datasets, and your data shape determines your result more than any published figure does.
A sensible evaluation
- Take a representative payload from your actual pipeline.
- Count tokens as compact JSON, not pretty-printed, if that is what you currently send.
- Convert to TOON and count again.
- Run the same task both ways and compare output quality, not just token count.
- Decide on the numbers you measured, not the ones in an article.
A Note on Maturity
Worth being straightforward about, because this format is less than a year old.
TOON is not a formally standardised specification
There is no RFC and no standards body. The specification lives in a project repository and implementations vary between practitioners.
Tooling is thin compared with JSON
A TypeScript SDK and a Python port exist alongside community implementations, but nothing like JSON's ecosystem.
Keep a JSON fallback
If TOON parsing fails or an implementation disagrees with another, a fallback path prevents silent data loss.
JSON remains the correct default for most work
TOON is a specialised tool for a specific problem: token overhead in high-volume pipelines where you control both the prompt and the parser. It is not a JSON replacement, and the community around it has been notably clear-eyed about that.
Common Mistakes to Avoid
The published range is a best case measured on uniform tabular arrays against pretty-printed JSON. If your data is deeply nested, non-uniform, or you already send compact JSON, your saving will be far smaller and may be negative once TOON's roughly 5% header overhead is counted. Measure your own payloads with your model's tokenizer before committing to a conversion.
TOON post-dates the training data of most models, so while they read it comfortably, generating it reliably requires a one-shot example in the prompt. That example costs tokens, frequently more than the reply saves. Send TOON as input and accept JSON as output, which models produce natively and existing parsers already handle.
TOON's entire advantage comes from factoring out repeated field names in uniform arrays. Deeply nested structures have no repeated field list to remove, so TOON adds overhead without the benefit, and published benchmark work explicitly recommends against it for deep hierarchies. YAML or JSON is the better choice for anything tree-shaped.
Quick Reference
|
Item |
Detail |
|
TOON |
Token-Oriented Object Notation |
|
Released |
October 2025 |
|
Structure |
YAML indentation plus CSV rows |
|
Mechanism |
Field names declared once, not per record |
|
vs pretty-printed JSON |
~40% saving |
|
vs compact JSON |
~25% saving |
|
Overhead |
Adds ~5% in headers |
|
Wins on |
Uniform tabular arrays |
|
Loses on |
Deeply nested data |
|
Single flat table |
CSV is smaller |
|
Accuracy |
Went up in benchmarks, not down |
|
Best used as |
Input, not model output |
|
Standard |
Not formal, keep a JSON fallback |
|
Measuring |
Use a tokenizer, not character count |
