JSON to TOON Converter
Paste your JSON, or open a .json file, and click Convert to TOON. The token table under the result tells you whether TOON is actually cheaper for this data. Switch the direction at the top to turn TOON back into JSON.
Direction
Token count (o200k tokenizer, used by GPT-4o and GPT-5)
| Format | Tokens | Characters |
|---|
Why I built this
TOON showed up in late 2025 as a way to feed JSON-shaped data to a language model without paying for every brace, quote and repeated key. Within a few months there were dozens of JSON to TOON converters online. I tried a bunch of them before writing this one, and almost all of them had the same gap: they told you TOON saves 30 to 60 percent and then showed an estimate, usually characters divided by four. That's not a token count. It can be off by a lot, especially with numbers, emails and non-English text.
So this converter does two things the others mostly skip. It counts tokens with the real o200k tokenizer, the same one GPT-4o and GPT-5 use, and it puts JSON and TOON side by side so you can see the actual number for your data. It also tries all three TOON delimiters and tells you which one is cheapest, because that changes from one dataset to the next and nobody remembers to check.
What TOON actually is
TOON stands for Token-Oriented Object Notation. It carries exactly the same data as JSON: objects, arrays, strings, numbers, true, false and null. The difference is the layout. Objects use indentation instead of braces, strings only get quotes when they need them, and an array of objects that all share the same keys is written as a small table. The keys appear once in a header, and each row is just the values.
A list of orders in JSON repeats "id", "customer" and "total" on every single row. In TOON it looks like this:
orders[3]{id,customer,total}:
1001,Ana Silva,42.5
1002,Jonas Weber,18.9
1003,Claire Martin,96.2The [3] is the row count and the part in braces is the field list. Both turn out to be useful for more than saving space, because a model (or a parser) can tell straight away if rows went missing.
This tool uses the official TOON library, version 4.4, which follows the current spec. That includes the newer keyed table form for objects whose values all share one shape, so you get the same output the reference encoder would give you.
How to use it
If the converter says your JSON is invalid and you can't spot why, run it through the JSON formatter first. It points at the exact line that's broken.
Leave the direction on JSON to TOON, paste your JSON into the box or click Open file, and press Convert to TOON. The result shows up below with Copy and Download buttons. The download is a .toon file, which is plain UTF-8 text, so you can open it in any editor.
Two settings matter. The delimiter decides what separates the values in a row: comma, tab or pipe. Indentation is 2 spaces by default, which is what the spec recommends and what costs the fewest tokens. I'd leave it there unless whatever reads the file wants 4.
If you just want to see what happens, click Try a sample. It loads a small order list so you can watch the numbers change as you switch delimiters.
Reading the token table
After every conversion you get a small table with five rows: pretty printed JSON, minified JSON, and TOON with each of the three delimiters. Each row shows tokens and characters. The line under it compares your TOON against minified JSON, not the pretty printed version. That's on purpose. Comparing against pretty JSON makes every format look amazing, because indentation alone burns a lot of tokens, and it's not a fair fight if you were going to minify anyway.
The token counter is a couple of megabytes, so it loads the first time you convert and then stays in memory. If your connection blocks it, the converter still works and the table just shows character counts.
One honest caveat: o200k is OpenAI's tokenizer. Claude, Gemini and Llama each have their own, and their counts will differ a bit. The ratio between JSON and TOON tends to hold up across tokenizers though, so it's still a good guide for which format is cheaper.
When TOON wins and when it doesn't
For data that's completely flat with no nesting at all, plain CSV can be even smaller than TOON. The JSON to CSV converter gives you that version to compare.
TOON is great at one shape of data: long arrays of objects that all have the same keys. Product catalogs, log lines, rows out of a database, search results, analytics exports. On data like that, savings of 30 to 50 percent against minified JSON are normal, and the more rows you have, the better it gets, because the keys are only written once.
It's much less impressive on deeply nested config files or objects where every item has different fields. TOON falls back to a list layout there, and sometimes it ends up costing more tokens than minified JSON. The tool will tell you when that happens instead of pretending. If you see the warning, my advice is simple: send minified JSON and move on.
The delimiter makes a difference too. Tabs are often the cheapest, since a tab tends to be its own token and rarely shows up inside your values, so fewer strings need quotes. Commas are the default and the most readable. Pipe is handy when your data is full of commas, like addresses or free text. Don't guess. Look at the table.
A few real situations
Starting from a spreadsheet? Turn it into JSON with the CSV to JSON converter, then bring it back here for the TOON version.
You're building a RAG pipeline and each prompt carries 200 search results with the same eight fields. Converting that block to TOON can free up a big chunk of your context window for the actual question and the answer.
You're paying per token for a batch job that classifies 50,000 support tickets, a hundred at a time. Cutting even a third of the input tokens shows up on the invoice at the end of the month.
You want to paste a spreadsheet export into ChatGPT or Claude and ask questions about it. TOON reads almost like a table, so the model has an easier time keeping track of which value belongs to which column, and you hit the message limit later.
Or you got a .toon file from someone else's pipeline and just need to see it as normal JSON. Flip the direction and convert.
Going back: TOON to JSON
Switch the direction to TOON to JSON and paste your TOON. The decoder is strict by default, which means it checks that the row counts in the headers match the rows that are actually there, and that each row has the right number of values. That's the whole point of those counts. If a model's output got cut off halfway through a table, strict mode catches it and tells you the line number.
Untick Strict check if you're dealing with hand-edited TOON and just want the data out. You'll still get an error for real syntax problems, like a broken quote.
The Use result as input button swaps things around, so you can round-trip a file and confirm nothing changed.
Things to watch out for
Very large integers, the kind you get as IDs from Twitter or some databases, lose precision in JavaScript once they go past about 9 quadrillion. That's a JSON-in-the-browser problem, not a TOON one, but it means a 19-digit ID can come out slightly different. If your IDs are that long, store them as strings in the JSON first.
TOON keeps key order, but in a table the column order comes from the first row. If later objects list their keys in a different order, the decoded JSON will use the header order. The data is identical, it just looks reshuffled.
And TOON is for feeding models and moving data around, not for storing it long term or sending it to public APIs. Keep JSON as your source of truth and convert at the edge.
Privacy
The conversion and the token count both happen in JavaScript inside your browser tab. Your JSON is never sent to our server. The page downloads two open source libraries from a public CDN, the TOON encoder and the tokenizer, and that's the only network traffic involved. Paste internal data, customer lists or API responses without worrying about where they end up.
Frequently Asked Questions About the JSON to TOON Converter
Similar tools to explore
Tab Delimited File to Excel Converter
Paste tab-separated data or upload a .tsv file and get back a clean XLSX with the columns lined up. No account, and an uploaded file is deleted the moment the conversion finishes.
Convert to ExcelGoogle Maps Timeline Viewer
Open your Google Maps Timeline export right in the browser: coverage calendar, missing days, visits, and distance stats. The file never leaves your device.
View My TimelineE-Invoice Viewer
Drop an XRechnung or UBL XML file, or a ZUGFeRD or Factur-X PDF, and read it as a normal invoice. Totals and VAT get checked, and nothing leaves your browser.
View InvoiceAmps to kW calculator
Convert electrical current in Amps to real power in Kilowatts (kW) with power factor correction for DC, single-phase, and three-phase circuits.
Convert Power NowKilowatts to Amps Calculator
Convert power in kilowatts (kW) to current in amperes (Amps) for sizing electrical breakers, wiring, and panels.
Convert kW to AmpsAmps to kVA Calculator
Convert electrical current (Amps) to apparent power (kVA) for single-phase and three-phase circuits with accurate electrical engineering formulas.
Convert Amps to kVA