JSON to TOON Converter (Token-Oriented Object Notation)

Shrink structured data for LLM prompts by writing arrays of uniform objects as tables instead of repeating every key.

Use the tool

Why this tool exists

TOON writes objects with indentation, primitive arrays inline (tags[2]: a,b) and arrays of uniform objects as a header plus one row per item (users[2]{id,name}:). Strings are quoted only when needed. The output of this tool follows the core of the published spec and decodes with the reference @toon-format/toon library; tested by round-tripping thousands of random values in both directions.

This implementation writes the standard forms and does not use the newer nested-column or keyed-table extensions. Savings are largest for long lists of similar records; deeply nested or irregular data saves little. Token counts shown are 4-characters-per-token estimates.

No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.

How to use it

  1. Paste JSON.
  2. Choose indentation and array delimiter (comma, tab or pipe).
  3. Copy the TOON and read the character and token savings.
  4. Tell the model the format in your prompt, or include one example.

Frequently asked questions

Do models understand TOON?

Most do well with a short description or example, but test on your task before relying on it.

Is it always smaller?

Uniform arrays shrink most. Small or irregular objects may save little or even grow.

Is it lossless?

Yes for JSON data: numbers, strings, booleans, null, arrays and objects round-trip. NaN and Infinity become null.

Is my data sent anywhere?

No. Everything is processed in your browser, and the page makes no network requests with your input.