Convert between Token-Oriented Object Notation and JSON
TOON (Token-Oriented Object Notation) is a compact format designed for LLMs that reduces token usage by up to 60%. This tool converts between TOON's efficient row-based syntax and standard JSON, helping you save API costs and improve prompt efficiency.
TOON (Token-Oriented Object Notation) represents a breakthrough in data serialization for the AI era. While traditional formats like JSON and XML were built for general computing, TOON is laser-focused on token efficiency—crucial when every token affects cost and performance in LLM applications.
By reimagining how we structure data for AI consumption, TOON achieves remarkable compression without sacrificing readability. It combines the best aspects of CSV's compactness with YAML's flexibility, creating a format that both humans and AI models can easily understand.
[
{
"id": 1,
"name": "Alice",
"role": "admin"
},
{
"id": 2,
"name": "Bob",
"role": "user"
}
]~59 tokens • Verbose
users[2]{id,name,role}:
1,Alice,admin
2,Bob,user~24 tokens • 59% savings! ✨
Cut token consumption by up to 50% versus JSON, lowering API costs and maximizing context window utilization.
Represents uniform object arrays using CSV-style rows with single-declaration headers, perfect for database records.
Built-in length indicators [N] and field headers {field1,field2} make data organization instantly clear.
LLMs parse and generate TOON naturally without training, treating it like familiar YAML or CSV formats.
Handles complex hierarchies with YAML-inspired indentation while maintaining exceptional readability.
Battle-tested format that remains human-readable for debugging while optimized for machine processing.
Minimize token usage when sending structured data to AI models, fitting more information within context limits.
Return database queries and tabular data in a format that reduces processing costs for AI consumers.
Store and retrieve structured information efficiently in Retrieval-Augmented Generation pipelines.
Define AI system parameters and settings using a compact, token-conscious format.
Transform your JSON data into token-efficient TOON format instantly. See real-time token savings and optimize your LLM applications for better performance and lower costs.
💡 Pro Tip: TOON shines brightest with uniform tabular data—the more consistent your structure, the greater your savings!