Reduce LLM token costs
Every call to a hosted model is billed by the token, and the fastest-growing line on that bill is usually the structured data you paste into prompts: catalogs, rows from a database, API responses, retrieved records. If a large share of your prompt is a table dressed up as JSON, you are paying for a lot of punctuation. Converting that data to TOON is one of the few token optimizations that is both simple and measurable.
Where the tokens go
JSON repeats every field name on every object and wraps each value in quotes, braces and commas. For a hundred-row array, the model reads the key customer a hundred times. That structural overhead is pure cost — it carries no information the model needs after the first row.
How TOON removes it
TOON declares the field names once as a header, states the row count, then streams the values like a table:
orders[3]{id,customer,total,shipped}:
1001,Ada Lovelace,129.5,true
1002,Alan Turing,88.0,false
1003,Grace Hopper,342.75,trueThe same data as JSON runs roughly two to three times the characters and, more importantly, two to three times the tokens once the tokenizer counts every quote and brace. On uniform arrays this is where the 30–60% saving comes from.
The cost math
Multiply it out: tokens saved per call × price per million input tokens × calls per month. A prompt that drops from 1,200 to 500 input tokens saves 700 tokens; at a few dollars per million tokens across millions of calls, that compounds into real money. The JSON to TOON converter prints the exact token counts for both formats (using the real o200k and cl100k tokenizers) and the dollar difference at current model prices, so you can size the saving on your own data instead of trusting a headline number.
When it will not help
- Small payloads — the fixed savings are not worth a conversion step.
- Deeply nested or irregular objects — TOON's advantage is tabular data.
- Prose-heavy prompts — most of the tokens are the instructions, not the data.
Being honest about this matters: TOON is a targeted lever for bulk structured context, not a magic discount on every prompt. See TOON vs JSON for the full trade-off.
Try it on a real prompt
Paste the data from your most expensive prompt into the converter and read the receipt. If it is a uniform table, you will likely see a saving you can ship today — the conversion runs entirely in your browser, so it is safe for production payloads.