Convert JSON to Token-Oriented Object Notation for 30-60% token reduction
Token-Oriented Object Notation (TOON) is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage.
TOON was created by Johann Schopplich on October 26, 2025, and announced on X (formerly Twitter) . The library is open-source and available on GitHub .
"Token-Oriented Object Notation is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage. It's intended for LLM input, not output. TOON's sweet spot is uniform complex objects – multiple fields per row, same structure across items. It borrows YAML's indentation-based structure for nested objects and CSV's tabular format for uniform data rows, then optimizes both for token efficiency in LLM contexts."
TOON has been benchmarked across multiple datasets and LLMs (GPT-5 Nano, Claude Haiku, Gemini 2.5 Flash, and Grok-4), demonstrating:
Full benchmarks and methodology available in the GitHub repository
| JSON | TOON | Description |
|---|---|---|
{ "id": 1, "name": "Ada" } | id: 1 | Simple object |
["foo", "bar"] | [2]: foo,bar | Primitive array |
[{"id": 1}, {"id": 2}] | [2]{id}: | Tabular array |
{ "user": { "id": 1 } } | user: | Nested object |
TOON uses indentation for nesting and declares array lengths and fields upfront for better LLM comprehension.