TOON to JSON Converter Online — Free
Convert TOON (Token-Oriented Object Notation) back to formatted JSON, and validate it while you are at it.
Frequently Asked Questions
Can I use this to validate TOON?
Yes. The decoder runs in strict mode, so declared array lengths and tabular row counts must match the actual data. If anything is off you get an error naming the line instead of silently wrong output.
What indentation does the decoder expect?
Indent width is detected from the document itself, so both 2-space and 4-space TOON decode correctly.
What causes a decode error?
The most common causes are a row count that does not match the declared length in brackets, a row with the wrong number of fields for its header, or inconsistent indentation between nested levels.
Privacy First: All processing happens directly in your browser. Your data never leaves your device.
About TOON → JSON
Decoding TOON back to JSON turns a compact prompt payload into something your code and your tooling can consume — and validates the document in the process, since a structurally inconsistent file will not decode.
Decoding is also validation
The decoder runs strictly. A tabular block declares both its row count and its field list up front, and both are enforced: a block declaring three rows that supplies two is an error, as is a row whose field count does not match its header.
This makes the tool useful as a check on model output. When an LLM is asked to emit TOON, a truncated or malformed response fails loudly here rather than silently producing a short array.
Common decode errors
- A declared length that does not match the number of rows — most often a response truncated by a token limit.
- A row with the wrong number of comma-separated fields for its header.
- Inconsistent indentation between nested levels. TOON descends one level at a time, and a level that jumps two is ambiguous.
- Tab characters used as indentation, which are not valid.
- An unquoted value containing a comma, which is read as a field separator and shifts every column after it.
Indentation is detected automatically
TOON documents may be written with two-space or four-space indentation. Rather than assuming, this decoder reads the indent width from the document itself, so output produced at either setting round-trips correctly back to JSON.