JSON to TOON Converter
Convert JSON to Token-Oriented Object Notation for 30-60% token reduction in LLM contexts.
About TOON Format
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."
Proven Performance
TOON has been benchmarked across multiple datasets and LLMs (GPT-5 Nano, Claude Haiku, Gemini 2.5 Flash, and Grok-4), demonstrating:
- •Token Efficiency: 30-60% reduction vs JSON on uniform datasets
- •Retrieval Accuracy: 70.1% average accuracy (vs JSON's 65.4%) while using 46.3% fewer tokens
- •Best-case savings: Up to 58.9% token reduction on time-series analytics data
Key Benefits
- ✓30-60% fewer tokens than JSON
- ✓Human-readable structure
- ✓LLM-friendly guardrails
- ✓Minimal syntax overhead
- ✓Tabular format for uniform data
Best Use Cases
- ✓Large arrays of uniform objects
- ✓API responses for LLM context
- ✓Configuration data
- ✓Database exports
- ✓Structured prompts
Quick Reference
| 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.
Syntax Cheatsheet
Object
{ id: 1, name: 'Ada' }id: 1
name: AdaNested object
{ user: { id: 1 } }user:
id: 1Primitive array (inline)
{ tags: ['foo', 'bar'] }tags[2]: foo,barTabular array (uniform objects)
{ items: [
{ id: 1, qty: 5 },
{ id: 2, qty: 3 }
]}items[2]{id,qty}:
1,5
2,3