JSON ↔ TOON Converter
Convert JSON to TOON and back for compact LLM prompts
Bundled version: TOON spec v4.1 · @toon-format/toon 4.1.1
About the JSON ↔ TOON Converter
TOON (Token-Oriented Object Notation) encodes the JSON data model with indentation, declared array lengths and tabular rows, so payloads for language models need fewer characters. This converter uses the official @toon-format/toon library in your browser to turn JSON into TOON and TOON back into JSON, and shows the bundled spec version.
How to use
- 1.Choose JSON → TOON or TOON → JSON.
- 2.Paste data, open a .json or .toon file, or load an example.
- 3.Adjust the delimiter, indent or strict parsing.
- 4.Check the representation size, then copy or download the output.
- 5.Select Verify round trip to confirm that JSON → TOON → JSON returns identical data.
When TOON saves the most
TOON is most compact for uniform arrays of objects, where field names are declared once and each element becomes one row. Deeply nested or irregular data falls back to list form and saves less; compact JSON can even be smaller. Sizes shown are bytes and characters; optional token counts use one named tokenizer and differ across models.
Limits
Input is limited to 2,000,000 characters and 256 nesting levels. Integers beyond the JavaScript safe range lose precision when JSON is parsed. Dotted key folding is not offered by the bundled library version. TOON is a working draft; output follows the bundled spec version shown in the tool.
