TOON to JSON Converter
Convert TOON (Token-Oriented Object Notation) to JSON format for compatibility and readability
Input
Output
Paste your TOON on the left and the JSON shows up here.
Or drop a file on this box, , or .
What is TOON to JSON Converter?
TOON (Token-Oriented Object Notation) saves tokens in an LLM prompt, but once a model answers in TOON, the rest of your stack still wants JSON. Paste the TOON here and you get the equivalent JSON back, with a header like users[3]{id,name,role}: expanded into an array of three objects.
The converter decodes TOON with the official @toon-format/toon library and pretty-prints the JSON. Tabular blocks like orders[2]{id,sku}: become arrays of objects, and integers too long for a JavaScript number (a 19-digit ICCID, say) are written with every digit instead of being rounded. Learn more about JSON at MDN.
The decoding runs in this tab, so whatever you paste stays on your machine. It is strict, too: if a header promises [3] rows and only two follow, you get "Expected 3 tabular rows, but got 2" rather than a quietly shorter array. When that happens, the TOON Validator is a quick place to find the bad line, and the TOON Formatter will tidy the indentation before you try again.
What Makes This Tool Different
Lossless Conversion
Objects, arrays, tabular rows, strings, numbers, booleans and null all come back as the matching JSON, and long integers keep every digit.
Local Processing
Conversion happens in milliseconds. Paste your TOON, and get formatted JSON. No waiting, no server delays – pure browser-side processing.
Pretty Formatted Output
The JSON output is beautifully formatted with proper indentation (2 spaces) and line breaks. Easy to read, easy to debug, ready to use.
File Upload Support
Got a TOON file? Just upload it. Works with .toon and .txt files. No need to copy-paste – just drag and drop or click upload.
Download JSON
One click to download your converted JSON as a .json file. Perfect for saving, sharing, or importing into other tools and systems.
Error Detection
Invalid TOON syntax? We'll show you exactly what's wrong. Clear error messages help you fix issues quickly before converting.
How It Works
Paste or Upload TOON
Paste TOON into the left editor, or press Upload for a .toon or .txt file. Sample loads a three-row users table with id, name and role columns, which is the shape TOON is most often used for.
Automatic Conversion
There is no Convert button. Pause typing for roughly 300 milliseconds and the TOON is decoded and the JSON appears on the right, with numbers kept as numbers. If decoding fails, the right panel shows "Invalid TOON:" followed by the reason.
Copy or Download
Download gives you a converted.json file; Copy places the text on the clipboard instead. Both refuse to act while the panel holds an error message instead of JSON.
When You'd Actually Use This
LLM Integration
Working with LLMs that output TOON format? Convert it back to JSON for integration with your existing APIs, databases, or frontend applications that expect standard JSON.
API Compatibility
Need to send data to APIs that only accept JSON? Convert your TOON data to JSON format for seamless integration with REST APIs, GraphQL endpoints, or web services.
Tool Compatibility
Many development tools, validators, and formatters only work with JSON. Convert TOON to JSON to use these tools while still benefiting from TOON's token efficiency when working with LLMs.
Data Sharing
Sharing data with team members or systems that don't support TOON? Convert to JSON for universal compatibility. Everyone can work with JSON, making collaboration easier.
Common Questions
Is my TOON data stored?
No. The @toon-format/toon decoder is bundled into this page and runs in your tab, so the model output you paste is not sent to a server. If you want the same decoding inside your own app, the package is on npm; call its decode() function on the string.
What TOON formats are supported?
Everything the TOON library decodes: nested objects, inline arrays like tags[3]: a,b,c, tabular arrays with a {field,list} header, list items, and comma, tab or pipe delimiters. Row counts in headers are checked, so a header that says [3] with two rows is an error.
Can I convert invalid TOON?
No. Decoding is strict, so a broken document stops with the library's reason in the output panel, for example "Expected 3 inline array items, but got 2" for tags[3]: a,b, or "Tabs are not allowed in indentation" when an editor slipped a tab in. Correct the line it points at and the JSON comes back. The TOON Validator runs the same check on its own page.
Is the conversion lossless?
For values, yes. Every string, number, boolean, null, object and array becomes the equivalent JSON, and integers past JavaScript's 2^53 limit are written with their exact digits. JSON has no tabular form, so tables become arrays of objects; that's a change of layout, not of data. If you miss the tabular view, paste the JSON into the JSON parser that shows a table and the rows are rows again.
How big can my TOON file be?
TOON documents are usually prompt-sized, a few hundred lines at most, and those decode as you type. Nothing is uploaded, so there is no size limit beyond your device; a multi-megabyte file may simply pause for a moment after each edit.
Why would I use TOON instead of JSON?
TOON is mainly useful inside LLM prompts, where uniform lists of records take fewer tokens than the same JSON. Outside that, JSON is what tools, APIs and databases understand, which is why this converter exists.
Other TOON Tools You Might Need
From JSON you can go back to TOON, or take the same data on to CSV, XML, YAML or TOML: