JSON ⇄ TOON Converter

Transform between JSON and TOON format - bidirectional conversion for modern LLMs.

0 JSON Tokens
0 TOON Tokens
0% Efficiency Gain

What is the JSON to TOON converter?

TOON (Token-Oriented Object Notation) is a compact, indentation-based way to write structured data. It drops the quotes, braces and commas that JSON repeats on every line, which means fewer tokens when you send the same data to a language model. This converter goes both ways - JSON to TOON to save tokens, and TOON back to JSON when you get a response.

Every conversion is measured: the tool counts tokens with the cl100k_base encoder used by GPT-3.5 and GPT-4 and shows the JSON tokens, the TOON tokens and the percentage saved, which is often 30-50% on real data.

How to use the JSON to TOON converter

  • 1. Pick a direction with the JSON to TOON / TOON to JSON toggle.
  • 2. Paste your data into the input on the left.
  • 3. Choose a delimiter (comma, pipe or tab) and indentation (2, 4 or minified), and optionally turn on length markers.
  • 4. It converts as you type; the output and token stats update on the right. Click Copy to take the result.

Features

  • Two-way JSON to TOON and TOON to JSON conversion.
  • Live token stats with the savings measured by a GPT-style tokenizer.
  • Comma, pipe or tab delimiters and 2, 4 or minified indentation.
  • Optional per-line length markers for debugging.
  • Lossless round-trip - convert to TOON and back without losing data.

When to use it

Reach for TOON when token budget matters: trimming a large JSON payload before it goes into a prompt, fitting more context into a model's window, or cutting API costs on high-volume calls. Convert back to JSON whenever you need standard output for code or storage.

FAQ

What is TOON format?

TOON (Token-Oriented Object Notation) is a minimal data format for LLM prompts. It removes JSON's quotes, braces and commas and uses indentation and colons for structure, which keeps the data readable while using fewer tokens.

How much can TOON save?

It depends on the data, but token savings are commonly in the 30-50% range and can be higher for large arrays of uniform objects. The stats panel shows the exact saving for your input.

Can I convert TOON back to JSON?

Yes. The converter is bidirectional and lossless, so you can turn JSON into TOON and turn the TOON output back into the same JSON.

Is my data uploaded?

Yes. The conversion runs on our server, so your input is sent there to be processed and is not stored. Avoid pasting sensitive data you would rather keep local.

Related tools