Output appears here...How to use
Add JSON
Paste JSON into the JSON pane, drop or upload a .json file, use Load URL, or press one of the examples: a product table, log events or a nested config. Choose a comma, tab or pipe delimiter.
Convert and compare
Press Convert to TOON. The panels show estimated tokens for minified JSON and for TOON and the difference. Enter your model's price and a request count to estimate the cost change.
Copy, download or reverse
Press Copy or Download .toon. To go back, press Swap direction, which moves the TOON into the input, then press Convert to JSON to rebuild the original.
Why JSON to TOON Converter
- Writes arrays of objects that share the same keys as tables, with the keys listed once.
- Compares estimated tokens for minified JSON and TOON in both directions.
- Converts TOON back to JSON, so you can confirm nothing was lost.
- Upload, drop or load from a URL, and download .toon or .json, all inside your browser.
JSON vs TOON: the sample side by side
The sample on this page holds a model name, a temperature and four products with the same five fields. In TOON the products become one header line, products[4]{id,sku,name,price,inStock}:, followed by four rows such as 1,SKU-1001,Wireless Mouse,24.99,true.
The table shows the character counts and the tool's token estimates for each version of that sample. Minified JSON is the fair baseline, since that is what you would send to a model if you cared about tokens.
On this sample TOON uses about a third fewer estimated tokens than minified JSON. Your own data can differ a lot, so paste a real payload to see its numbers. The tab delimiter makes almost no difference here because none of the values contain commas.
| Version | Characters | Estimated tokens |
|---|---|---|
| JSON, pretty-printed (2 spaces) | 576 | 228 |
| JSON, minified | 360 | 157 |
| TOON, comma delimiter | 221 | 103 |
| TOON, tab delimiter | 222 | 104 |
When not to use TOON
TOON helps most when a model reads many rows of the same shape. In other cases it adds a conversion step for little or no gain.
- A program parses the result: APIs, function-calling arguments and tool outputs expect JSON.
- The data is deeply nested or each item has different keys, so there are no tables to form.
- The payload is small, so the saving is a handful of tokens.
- Your model gives worse answers with TOON in your own tests. Check before switching a production prompt.
- You edit or diff the data by hand often. Editors, linters and libraries widely support JSON, while TOON is newer and has far fewer tools, so keep JSON as the source and convert when you build the prompt.