Skip to main content
smnify.

JSON to TOON Converter

Paste a JSON document and get the same data as TOON (Token-Oriented Object Notation), which writes a list of same-shaped objects once as a table instead of repeating every key. It is meant to make structured data shorter before you put it in an LLM prompt. Conversion runs in your browser.

Runs in your browser

Free, no sign-up. Conversion runs in your browser. The JSON you paste is not uploaded or stored and is never included in analytics, which record only actions such as 'convert' or 'copy'.

JSON to TOON Converter

Convert JSON into compact Token-Oriented Object Notation for LLM prompts.

JSON input

TOON output

TOON output will appear here.

Character Savings

0%

JSON Size

0

TOON Size

0

Tables Found

0

TOON encoding notes

Uniform arrays of primitive-only objects are encoded as compact tables with one field header and fixed-width rows. Other arrays use explicit lengths and expanded list items so nested JSON remains readable.

How to use the JSON to TOON Converter

  1. Paste your JSON into the JSON input box, or press Sample to load an example.
  2. Choose the delimiter used between table values: Comma, Pipe or Tab. Tick Sort keys to order object keys alphabetically.
  3. Read the TOON output. If the JSON is invalid, an error is shown instead of output.
  4. Check Character Savings, JSON Size, TOON Size and Tables Found to see what the conversion changed.
  5. Press Copy to put the TOON on your clipboard, or Download to save it as converted.toon.

Worked example

Sample data

Input
{"team":"Atlas","active":true,"members":[{"id":1,"name":"Asha","role":"dev"},{"id":2,"name":"Ben","role":"design"},{"id":3,"name":"Chen","role":"dev"}]}
Output
team: Atlas
active: true
members[3]{id,name,role}:
  1,Asha,dev
  2,Ben,design
  3,Chen,dev

Default settings (comma delimiter, keys not sorted). The tool reports 270 characters for the 2-space pretty-printed JSON and 91 for the TOON, a 66.3% character saving, and 1 table found. The three objects share the keys id, name and role, so the keys are written once in the members[3]{id,name,role} header.

How it works

What TOON is

TOON is a compact text notation for the JSON data model. Objects use indented key: value lines, similar to YAML, and arrays declare their length. When every item in an array is an object with the same primitive-valued keys, the array becomes a table: one header naming the fields, then one row per item.

Because the keys appear once instead of in every item, long lists of records get much shorter. Nested or mixed arrays do not form tables and are written as plain lists, so they save less.

How the savings are measured

Character Savings compares the TOON text with your JSON re-printed with 2-space indentation, not with minified JSON. Against minified JSON the gap is smaller, so check against what you actually send.

Characters are not tokens. Different models split text differently, so the real token saving depends on the model's tokenizer. Treat the figure as an indication and measure with your own model's token counter before relying on it.

character savings % = (JSON characters - TOON characters) / JSON characters x 100

Delimiters and quoting

Values in a table are separated by the delimiter you pick. Any string that contains the delimiter, or that could be confused with another type or with structure, is wrapped in quotes so the data stays unambiguous. Pipe or Tab can reduce quoting when your text contains many commas.

Inputs, outputs and limits

Inputs

  • JSON text, pasted or typed
  • Delimiter: Comma, Pipe or Tab
  • Sort keys on or off

Outputs

  • TOON text
  • Character savings, JSON size and TOON size in characters, and the number of tables found
  • Copy to clipboard and download as converted.toon

Limits

  • Input must be valid JSON; an error is shown otherwise.
  • Only arrays of objects with identical primitive-valued keys become tables.
  • Savings are compared with pretty-printed JSON and measured in characters, not model tokens.
  • There is no TOON to JSON direction.

Processing

  • Conversion runs in your browser. The JSON you paste is not uploaded or stored and is never included in analytics, which record only actions such as 'convert' or 'copy'.

Frequently asked questions

Is my JSON sent anywhere?

No. The conversion is JavaScript running on this page. Your data is not uploaded or logged, and analytics events never contain the input or output.

Will TOON always be shorter than JSON?

No. Lists of identical records shrink a lot, but deeply nested data or objects whose keys differ from item to item save little, and tiny inputs can show no saving at all.

Does a character saving mean fewer tokens?

Usually fewer, but not by the same percentage. Tokenisers differ per model, so measure with the token counter for the model you use before you commit to a format.

Can I convert TOON back to JSON?

Not with this tool: it converts JSON to TOON only. Keep your original JSON if you need to restore it.

Will an LLM understand TOON?

Many models read it correctly when you tell them the format in the prompt, but I cannot promise that for every model. Test with your own prompts and keep the JSON as a fallback.

Need an assistant connected to your own knowledge?

We build AI assistants and automations grounded in your documents and systems, with access controls and evaluation built in.