A simple trick cuts your LLM costs by 50%! Just stop using JSON and use this instead: TOON (Token-Oriented Object Notation) slashes your LLM token usage in half while keeping data perfectly readable. Here's why it works: TOON's sweet spot: uniform arrays with consistent fields per row. It merges YAML's indentation and CSV's tabular structure, optimized for minimal tokens. Look at the example below. JSON: { "๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€": [ { "๐—ถ๐—ฑ": ๐Ÿญ, "๐—ป๐—ฎ๐—บ๐—ฒ": "๐—”๐—น๐—ถ๐—ฐ๐—ฒ", "๐—ฟ๐—ผ๐—น๐—ฒ": "๐—ฎ๐—ฑ๐—บ๐—ถ๐—ป" }, { "๐—ถ๐—ฑ": ๐Ÿฎ, "๐—ป๐—ฎ๐—บ๐—ฒ": "๐—•๐—ผ๐—ฏ", "๐—ฟ๐—ผ๐—น๐—ฒ": "๐˜‚๐˜€๐—ฒ๐—ฟ" } ] } Toon: ๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€[๐Ÿฎ]{๐—ถ๐—ฑ,๐—ป๐—ฎ๐—บ๐—ฒ,๐—ฟ๐—ผ๐—น๐—ฒ}: ๐Ÿญ,๐—”๐—น๐—ถ๐—ฐ๐—ฒ,๐—ฎ๐—ฑ๐—บ๐—ถ๐—ป ๐Ÿฎ,๐—•๐—ผ๐—ฏ,๐˜‚๐˜€๐—ฒ๐—ฟ It's obvious how few tokens are being used to represent the same information! To summarise, here are the key features: ๐Ÿ’ธ 30โ€“60% fewer tokens than JSON ๐Ÿ”„ Borrows the best from YAML & CSV ๐Ÿคฟ Built-in validation with explicit lengths & fields ๐Ÿฑ Minimal syntax (no redundant braces, brackets, etc.) IMPORTANT!! That said, for deeply nested or non-uniform data, JSON might be more efficient. In the next tweet, I've shared some benchmark results demonstrating the effectiveness of this technique in reducing the number of tokens and improving retrieval accuracy with popular LLM providers. Where do you think this could be effective in your existing workflows? Find the relevant links in the next tweet!
Here are the benchmarks for token efficiency and retrieval accuracy as provided by the Toon team. You can find the same information in their GitHub repo: github.com/toon-format/toon
1
1
35
If you found it insightful, reshare with your network. Find me โ†’ @akshay_pachaar โœ”๏ธ For more insights and tutorials on LLMs, AI Agents, and Machine Learning!
A simple trick cuts your LLM costs by 50%! Just stop using JSON and use this instead: TOON (Token-Oriented Object Notation) slashes your LLM token usage in half while keeping data perfectly readable. Here's why it works: TOON's sweet spot: uniform arrays with consistent fields per row. It merges YAML's indentation and CSV's tabular structure, optimized for minimal tokens. Look at the example below. JSON: { "๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€": [ { "๐—ถ๐—ฑ": ๐Ÿญ, "๐—ป๐—ฎ๐—บ๐—ฒ": "๐—”๐—น๐—ถ๐—ฐ๐—ฒ", "๐—ฟ๐—ผ๐—น๐—ฒ": "๐—ฎ๐—ฑ๐—บ๐—ถ๐—ป" }, { "๐—ถ๐—ฑ": ๐Ÿฎ, "๐—ป๐—ฎ๐—บ๐—ฒ": "๐—•๐—ผ๐—ฏ", "๐—ฟ๐—ผ๐—น๐—ฒ": "๐˜‚๐˜€๐—ฒ๐—ฟ" } ] } Toon: ๐˜‚๐˜€๐—ฒ๐—ฟ๐˜€[๐Ÿฎ]{๐—ถ๐—ฑ,๐—ป๐—ฎ๐—บ๐—ฒ,๐—ฟ๐—ผ๐—น๐—ฒ}: ๐Ÿญ,๐—”๐—น๐—ถ๐—ฐ๐—ฒ,๐—ฎ๐—ฑ๐—บ๐—ถ๐—ป ๐Ÿฎ,๐—•๐—ผ๐—ฏ,๐˜‚๐˜€๐—ฒ๐—ฟ It's obvious how few tokens are being used to represent the same information! To summarise, here are the key features: ๐Ÿ’ธ 30โ€“60% fewer tokens than JSON ๐Ÿ”„ Borrows the best from YAML & CSV ๐Ÿคฟ Built-in validation with explicit lengths & fields ๐Ÿฑ Minimal syntax (no redundant braces, brackets, etc.) IMPORTANT!! That said, for deeply nested or non-uniform data, JSON might be more efficient. In the next tweet, I've shared some benchmark results demonstrating the effectiveness of this technique in reducing the number of tokens and improving retrieval accuracy with popular LLM providers. Where do you think this could be effective in your existing workflows? Find the relevant links in the next tweet!

Nov 7, 2025 ยท 7:20 PM UTC

9