TOON specification v4.1
TOON cuts this payload by 41%. The next one it inflates by 33%.
Every other converter quotes the first number. Paste your data and this one measures both — then tells you which format actually wins.
- Nothing leaves your browser
- Real tokenizers
- Free, no account
Measured against minified JSON
- API response−41%
- Plain table−42%
- Nested config+21%
- Records with a list+33%
Left saves tokens.Right costs them. Most converters only show you the left half.
Load a sample — each one ends differently:
Use TOON here
41% fewer tokens than minified JSON
| Format | Relative size | Tokens | vs. minified JSON |
|---|---|---|---|
| TOONcheapest | 210 | −41% | |
| JSON (minified) | 353 | — | |
| JSON (indented) | 618 | +75% |
Measured against minified JSON, because that is what goes into a prompt. Comparing against indented JSON, as most published figures do, adds about 30 points to every saving for free.
- Your records are uniform and flat. That is the one shape TOON’s tabular form is built for.
What this costs you
Saves $35.75 per month at this payload size.
Input tokens only. It ignores the tokens spent teaching the model TOON’s syntax, which on short prompts can exceed the saving entirely.
A uniform list of records inside a wrapper object. 14 records, 100% sharing the same fields. Nesting 4 levels deep.
Format optionscomma delimiter, indent 2
Tab or pipe delimiters often tokenize slightly cheaper than commas.
JSON
TOON
status: ok
page: 1
total: 214
data[14]{id,name,role,signups,active}:
1001,user_0,admin,10,false
1002,user_1,member,13,true
1003,user_2,member,16,true
1004,user_3,admin,19,true
1005,user_4,member,22,false
1006,user_5,member,25,true
1007,user_6,admin,28,true
1008,user_7,member,31,true
1009,user_8,member,34,false
1010,user_9,admin,37,true
1011,user_10,member,40,true
1012,user_11,member,43,true
1013,user_12,admin,46,false
1014,user_13,member,49,trueOne mechanism, and it either applies or it doesn’t
TOON declares each key once instead of once per record. Every number this tool reports follows from whether your data lets that happen.
Runs in your browser
Conversion, counting and analysis are JavaScript on this page. The server never receives what you paste, so there is nothing to log and nothing to promise.
Real tokenizers, not estimates
OpenAI models are counted with o200k_base and cl100k_base, the actual encodings. Claude and Gemini publish no offline tokenizer, so those numbers are labelled estimates rather than quietly presented as facts.
Compared against minified JSON
Not against indented JSON. Nobody sends that to a model, and it inflates every saving by about 30 points before the format has done anything. CSV joins the comparison only where it would be lossless.
Questions worth asking before you switch
Every number below is measured by the analyzer on this page, at build time, from the sample payloads you can load into the converter yourself.
Is TOON actually worth it?
Sometimes, and the shape of your data decides — which is why this page measures yours instead of quoting an average. A typical API response, a uniform record array inside an envelope: TOON uses 41% fewer tokens than minified JSON (210 against 353, counted with OpenAI's o200k tokenizer). A deeply nested configuration object: TOON uses 21% more tokens (81 against 67). The widely quoted "30–60% savings" describes the first case and quietly assumes the second never happens.
When should I not use TOON?
Three cases, and they are common ones. Deeply nested or irregular data: no repeated key set means no header to amortise, and minified JSON wins by 21% more tokens in the config example above. Records holding an array or object: one non-primitive field drops TOON out of its tabular form into a list that repeats every key, costing 33% more tokens than minified JSON. Short prompts: the tokens spent teaching the model TOON's syntax can exceed everything the format saves.
Is CSV better than TOON for tabular data?
For a flat array of primitives, yes — and this tool says so. In the plain-table example CSV needs 163 tokens against TOON's 195 and minified JSON's 338. TOON earns its place where CSV cannot represent the payload at all: an envelope around the records, several arrays in one document, or mixed value types. CSV appears in the comparison here only when it would be lossless — a CSV of just the record array would silently drop everything around it.
How does TOON handle nested data?
It encodes nested data correctly and stops saving tokens on it. The tabular form needs every record to share one key set of primitive values; that is where field names get declared once and rows stream underneath. Nested values fall back to a YAML-style indented list that repeats each key per record. Still valid, still round-trips, simply no longer cheaper than JSON.
Are the token counts exact?
For OpenAI models, exactly. GPT-4o, GPT-4.1 and GPT-5 use o200k_base and GPT-3.5 uses cl100k_base, both run in your browser with the real tokenizer. For Claude and Gemini, no — and the interface says so on every number. Anthropic and Google publish no offline tokenizer (Anthropic counts only through its /v1/messages/count_tokens endpoint), so those figures are estimates scaled from an OpenAI count. Treat them as a direction, not a budget.
Is my data uploaded anywhere?
No, and there is no endpoint that could accept it. Conversion, token counting and analysis are JavaScript running on this page; the server sends static HTML and receives nothing back. Share links carry your input in the part of the URL after the #, which browsers never send to a server. Visits are counted with self-hosted, cookie-free software on the same machine, which sees the page and coarse request information and never the editor. Details on the privacy page.
What is TOON?
TOON — Token-Oriented Object Notation — is a line-oriented encoding of the JSON data model, built to spend fewer tokens when structured data goes into an LLM prompt. It borrows YAML's indentation for nesting and CSV's tabular form for uniform arrays: field names declared once, records streamed as rows. This converter implements the official specification, version 4.1.