JSON to TOON Converter
A compact encoding of JSON designed for LLM prompts.
TOON (Token-Oriented Object Notation) is a compact, human-readable encoding of the JSON data model built for LLM prompts. It uses indentation instead of braces, and writes arrays of uniform objects as a table: the field names are declared once in a header such as users[3]{id,name,role}: and each record follows as a single comma separated row.
Because keys are not repeated for every record, TOON can use substantially fewer tokens than JSON for tabular data, and the declared length and fields help a model read the structure. The token panel shows the real count for your document in each format so you can decide with numbers rather than guesses.
How to use it
- Paste JSON into the left editor.
- Read the TOON output on the right and the token comparison in the side panel.
- Copy the TOON into your prompt. To convert back, set the input format to TOON.
Questions
When does TOON save the most tokens?
On arrays of objects that share the same keys, such as database rows, search results or product lists. For deeply nested or irregular data the saving shrinks, and minified JSON can be smaller.
Is TOON lossless?
Yes. TOON encodes the same objects, arrays and primitives as JSON, and decoding returns the original data.
Should a model also output TOON?
TOON is mainly intended for model input. For model output, JSON with structured outputs or tool calling remains the most reliable choice.
All tools
- JSON Formatter
- JSON Validator
- JSON Minifier
- JSON Repair
- JSON Diff
- JSON Schema Validator
- JSON to YAML
- YAML to JSON
- JSON to CSV
- CSV to JSON
- JSON to XML
- XML to JSON
- YAML Formatter
- XML Formatter
- JSONL Validator
- JSON to TOON
- LLM Token Counter
- LLM Token Optimizer
- JSON to TypeScript
- JSON Schema Generator
- LLM Tool Schema Generator