New · Format converter
JSON → TOON, for leaner LLM prompts.
TOON (Token-Oriented Object Notation) is a compact, lossless encoding of the JSON data model designed to spend fewer tokens when you paste structured data into an LLM. Convert in the editor and see an estimated token saving live.
lossless round-tripofficial @toon-format speclive token estimate
Runs entirely in your browser
JSON
{
"users": [
{ "id": 1, "name": "Ada", "role": "admin" },
{ "id": 2, "name": "Linus", "role": "dev" },
{ "id": 3, "name": "Grace", "role": "dev" }
]
}TOON≈ 45% fewer tokens
users[3]{id,name,role}:
1,Ada,admin
2,Linus,dev
3,Grace,devFewer tokens, same data
TOON keeps JSON's exact structure but drops repeated punctuation — uniform arrays of objects compress the most. The converter shows an estimated token saving vs compact JSON.
Lossless round-trip
TOON encodes the full JSON data model. Decode it back and you get the original value — no fidelity loss.
Built on the official spec
Uses the official @toon-format/toon library, so output tracks the published TOON specification.
Privacy-first
Encoding runs entirely on your device — no signup, no uploads, no telemetry. Your data never leaves the browser.
FAQ
What is TOON?
Token-Oriented Object Notation — a line-oriented, indentation-based encoding of the JSON data model. It combines YAML-style nesting with a CSV-style tabular layout for uniform arrays, aiming to use fewer LLM tokens than equivalent JSON while staying human-readable.
How accurate is the token-savings number?
It's an estimate. We approximate tokens at roughly 4 characters per token and compare TOON against compact JSON. Exact counts depend on the specific model's tokenizer (GPT, Claude, Gemini, etc. differ), so treat the percentage as a guide, not a guarantee.
Is the conversion lossless?
Yes. TOON encodes the same objects, arrays and primitives as JSON with deterministic round-trips, so decoding TOON back to JSON returns the original structure.
When does TOON help most?
Uniform arrays of objects (many rows, same fields) compress the most, since the field names are written once as a header instead of repeated per object. Deeply nested or highly irregular data saves less.