ZON Logo
Documentation
Docs
Essentials
ZON vs TOON

ZON vs TOON

ZON (Zero Overhead Notation) and TOON (Table Object Object Notation) are both modern data formats designed to be more efficient than JSON for Large Language Models (LLMs). While TOON pioneered the idea of "human-readable compression," ZON optimizes further for token efficiency and explicit schema validation.

At a Glance

FeatureZONTOONAdvantage
Token EfficiencyHigh (28% savings vs JSON)Moderate (25% savings vs JSON)ZON saves ~5-15% more tokens
Retrieval Accuracy100%100%Tie
Syntax StyleTabular/MinimalistStructured/VerboseZON is cleaner
Parsing SpeedFast (Stream-ready)ModerateZON

Token Efficiency Comparison

Benchmarks across multiple datasets and tokenizers (GPT-4o, Claude 3.5, Llama 3) consistently show ZON outperforming TOON, especially for tabular data.

Unified Benchmark Results

Aggregate results across 8 diverse datasets (E-commerce, Logs, Time-series, etc.):

MetricZONTOONJSON
Total Tokens19,99520,98828,042
vs JSON-28.7%-25.1%-
vs TOON-4.7%--

NOTE: ZON achieves these savings without sacrificing accuracy. By using explicit headers (@(N)) and strict boolean tokens (T/F), ZON ensures LLMs understand the structure perfectly while using fewer tokens than TOON's indented format.

Retrieval Accuracy

Both formats are designed to be unambiguous for LLMs. In our benchmarks using gpt-5-nano on Azure OpenAI, both achieved perfect scores.

  • ZON: 100% Accuracy (309/309 questions)
  • TOON: 100% Accuracy (309/309 questions)

The Difference: ZON achieves this accuracy with fewer tokens.

Why ZON Wins

1. Tabular Encoding for Arrays

TOON uses a verbose indented syntax for arrays. ZON uses a highly efficient CSV-like tabular format with explicit headers, eliminating repetitive keys and indentation tokens.

context{location:Boulder,season:spring_2025,task:Our favorite hikes together}
friends[ana,luis,sam]
hikes:@(3):companion,distanceKm,elevationGain,id,name,wasSunny
ana,7.5,320,1,Blue Lake Trail,T
luis,9.2,540,2,Ridge Overlook,F
sam,5.1,180,3,Wildflower Loop,T

2. Minimal Syntax Overhead

ZON removes unnecessary punctuation like braces {}, brackets [], spaces and commas , where they aren't strictly needed for parsing. It relies on a strict schema-first approach (@(N):cols) rather than indentation, which is more robust against tokenization artifacts.

3. Stream-First Design

ZON is designed to be parsed byte-by-byte, making it ideal for streaming responses from LLMs. Its structure allows parsers to build objects incrementally without waiting for closing delimiters or tracking indentation levels.

Conclusion

While TOON is a solid improvement over JSON, ZON represents the next generation of efficiency. It provides the same 100% retrieval accuracy but with better compression, faster parsing, and a more robust schema definition for LLMs.