TOON Converter
TOON Syntax Reference
Objects
name: John age: 30 address: city: NYC zip: 10001
Primitive Arrays
tags[3]: api,rest,json numbers[4]: 1,2,3,4
Tabular Arrays (Objects)
users[3]{id,name,active}:
1,Alice,true
2,Bob,false
3,Carol,true Strings
# No quotes needed usually title: Hello World # Quotes required for: value: "has: colon" num: "42" empty: ""
What is TOON?
Token-Oriented Object Notation (TOON) is a compact, human-readable format that encodes the same data as JSON but uses 30-60% fewer tokens. It's designed specifically for LLM prompts and responses, helping reduce API costs while maintaining the same data model with lossless round-trips.
Token Efficient
Uses indentation instead of braces, minimizes quoting, and collapses uniform object arrays into tables.
LLM Optimized
Explicit [N] lengths and {fields} headers give models clear schema to follow, improving parsing reliability.
JSON Compatible
Same data model as JSON - objects, arrays, strings, numbers, booleans, null. Deterministic, lossless conversion.
JSON vs TOON Example
JSON (more tokens)
{
"users": [
{"id": 1, "name": "Alice", "active": true},
{"id": 2, "name": "Bob", "active": false}
]
} TOON (fewer tokens)
users[2]{id,name,active}:
1,Alice,true
2,Bob,false