TOON (Token-Oriented Object Notation) is a lightweight data format designed to reduce token consumption in LLM applications while keeping structured data clear and readable. It removes most JSON punctuation—braces, brackets, commas, and repeated quotes—and instead relies on indentation to express hierarchy. The result is a compact, human-friendly representation of objects and arrays that is still deterministic and easy to parse.
Why use TOON? In token-metered environments, JSON can be expensive because of redundant symbols. TOON strips that overhead, often reducing token usage by 30–60% depending on the data shape. That makes TOON a strong choice for prompts, tool outputs, and logs where clarity matters but token budgets are tight.
Optimized JSON is different: it keeps standard JSON compatibility but removes whitespace. This is best when you must remain strict JSON while still shrinking payload size. TOON is for when you want a more compact, indentation-based syntax that reads like a condensed YAML without extra punctuation.
JSON:
{
"user": "cmds",
"active": true,
"tags": ["cli", "tools"],
"stats": { "runs": 42, "errors": 0 }
}
TOON:
user: cmds
active: true
tags:
- cli
- tools
stats:
runs: 42
errors: 0 JSON:
[
{ "name": "alpha", "score": 12 },
{ "name": "beta", "score": 9 }
]
TOON:
name | score
alpha | 12
beta | 9 Use TOON for prompt payloads, LLM tool outputs, or any context where fewer tokens mean lower cost and faster responses. Use optimized JSON for APIs, storage, or systems that require strict JSON.