JSON to TOON converter
Paste JSON or TOON, or open a local file. Convert in either direction and compare text sizes; files and text stay in your browser.
Convert JSON and TOON v4.4 locally. JavaScript is required for conversion.
How it works
This converter implements the JSON-value syntax of TOON v4.4 (working draft, 2026-10-08). It uses two-space indentation, length headers, primitive arrays, mixed lists, uniform object tables, nested table columns and keyed tables. Full-line comments are accepted when decoding. Quoting and escape rules follow sections 7–12 of the official specification.
Each conversion checks that decoding its encoded TOON preserves the parsed value, ignoring object key order. Minified JSON, two-space pretty JSON and canonical TOON are compared without a trailing newline. Characters are Unicode code points. The approximate token count is characters ÷ 4, rounded up; this requested heuristic is not a tokenizer and does not predict actual savings or billing.
Numbers use JavaScript finite double precision; large integers and decimals may be rounded when parsed. Quote identifiers that require exact digits. Integer-like object keys follow JavaScript enumeration order. Prototype-related keys are preserved as ordinary own properties. JSON duplicate keys follow JSON.parse last-write behavior; duplicate TOON keys are rejected.
Worked examples
Uniform users from the specification
Two users with id, name and role become one header and two rows:
users[2]{id,name,role}:
1,Ada,admin
2,Bob,userDecoding restores both objects and their three fields.
A primitive list
{"tags":["a","b","c"]} has 22 characters. TOON tags[3]: a,b,c has 14 characters. The TOON heuristic estimate is ceil(14 ÷ 4) = 4 tokens.
Frequently asked questions
Does TOON always use fewer tokens than JSON?
Which specification and fixture categories are supported?
How are delimiters handled?
What are the input limits?
Are files uploaded or saved on a server?
Sources
- Encoding Standard — TextDecoder BOM handling (checked 2026-11-14)
- Official TOON specification v4.4 — syntax, quoting, tables and validation (checked 2026-11-14)
Last reviewed 2026-11-14; next review due by 2027-02-12. The method is written out above so you can check our math.