What is TOON format?
TOON (Tab-Outlined Object Notation) is a compact, human-readable data format designed specifically to reduce token usage when passing structured data to Large Language Models (LLMs) like GPT-5, Claude, or Gemini.
It uses indentation with tab characters to represent hierarchy instead of braces, brackets, and quotes, making it significantly more token-efficient than JSON while remaining easy for both humans and LLMs to understand.
Example:
JSON: {"name": "John", "age": 30}
TOON:
name: John
age: 30
Key features:
- No quotation marks around keys or string values (unless they contain special characters)
- No braces or brackets for objects and arrays
- Tab indentation to show nesting levels
- Colons to separate keys from values
- Newlines to separate items
TOON typically achieves 30-60% token reduction compared to equivalent JSON, which translates directly to cost savings when using LLM APIs that charge per token.
The format was designed for LLM prompts specifically - it's not meant to replace JSON in traditional applications or APIs, but rather to optimize data representation when the consumer is an AI model that can understand both formats equally well.
LLMs trained on diverse text data can parse TOON format without any special instructions, as it resembles common text patterns like YAML, config files, and human-written outlines.