TOON to JSON Converter
Your data never leaves your browserDecode a TOON block back into standard JSON. Lossless, instant, and 100% in your browser.
Share this tool
Found it useful? Help a fellow developer discover it.
Decode a TOON block back into standard JSON. Lossless, instant, and 100% in your browser.
Share this tool
Found it useful? Help a fellow developer discover it.
Going the other way, compressing JSON into TOON to cut prompt tokens?
Convert JSON to TOON
TOON, short for Token-Oriented Object Notation, is a compact encoding for structured data designed to be cheap to send to a language model. It removes the repeated keys, braces, and quotes that make JSON expensive in a prompt, declaring a field header once and then listing rows beneath it. That saves roughly 40% of the tokens compared with pretty-printed JSON. The catch is that nothing downstream of your prompt speaks TOON. Your application code, your database, and your test assertions all expect JSON. This page handles that last step: paste the TOON a model returned, get back ordinary JSON you can parse.
Working with model output
Working with your own data
.json file.Paste your TOON into the left panel. This page opens already set to the TOON to JSON direction, so decoded JSON appears on the right immediately, pretty-printed and ready to copy. Everything runs in your browser.
Token-Oriented Object Notation. It is a compact serialization format built for language model prompts. Instead of repeating every key on every record the way JSON does, it declares the field names once as a header and lists the values as rows beneath, which removes most of the punctuation and repetition that consume tokens.
Yes. TOON represents the same data model as JSON, so a JSON document encoded to TOON and decoded again returns the original structure, with types and nesting intact. You can confirm this yourself using the Swap button to round-trip a payload.
Indentation is almost always the cause. TOON uses leading whitespace to mark which rows belong to a field header, so a block that has been reflowed, wrapped, or had its indentation stripped by a chat interface or terminal will decode differently. Copy the raw text rather than rendered output.
Roughly 40% fewer tokens than pretty-printed JSON for typical record-shaped data, and the saving grows with the number of records, because the field names are written once rather than once per object. Uniform arrays of objects benefit most. A single small object saves very little.
Yes. The AI Token Counter measures the same text against the tokenizers for GPT, Claude, Gemini and other models, so you can compare the TOON and JSON forms directly and see the saving for your own data rather than relying on an average.
Use the Swap button to flip direction in place, or open the JSON to TOON converter, a separate page written around the encoding direction and the token savings it produces.
No. Decoding happens entirely in your browser with client-side JavaScript. Model responses frequently contain customer data or internal context, so nothing is transmitted, stored, or logged.
JSON to TOON Converter
Convert JSON to TOON (Token-Oriented Object Notation) to reduce LLM prompt token usage by ~40%. Lossless and instant.
JSON Formatter & Validator
Format, beautify, validate, and minify JSON. Detects BigInt precision issues, duplicate keys, and JSONC comments.
AI Token Counter
Count tokens for GPT-5.6, Claude, Gemini, DeepSeek, and GLM. See context window usage and estimated API cost.
JSON Diff
Compare two JSON objects side-by-side and highlight differences.