TOON Encoder
Encode JSON to TOON (Token-Oriented Object Notation) format. Reduce token usage by 30-60% for LLM inputs with uniform data structures.
About TOON Encoder
Overview
The TOON Encoder converts JSON data into TOON (Token-Oriented Object Notation) format, a compact serialization format designed to reduce token usage when passing structured data to Large Language Models. TOON achieves 30-60% fewer tokens than formatted JSON for uniform arrays while maintaining explicit structure for reliable parsing.
Features
- Converts JSON to token-efficient TOON format
- Live mode for real-time encoding as you type
- Support for multiple delimiters (comma, tab, pipe)
- Configurable indentation (2-8 spaces)
- Key folding to collapse single-key wrapper chains
- File upload support for JSON files
- Drag and drop functionality
- Copy to clipboard with one click
- All processing happens locally in your browser
How to Use
- Enter or paste your JSON data in the input area
- Configure encoding options: delimiter, indentation, and key folding
- Click "ENCODE TO TOON" or enable Live Mode for instant encoding
- Copy the TOON-formatted result from the output area
- Use tab delimiters for maximum token efficiency
FAQ
What is TOON format?
TOON (Token-Oriented Object Notation) is a compact serialization format designed for passing structured data to Large Language Models. It uses indentation-based structure and tabular format to reduce token usage by 30-60% compared to JSON for uniform arrays while maintaining explicit structure for reliable parsing.
When should I use TOON encoding?
Use TOON when passing structured data to LLMs where token costs matter. TOON excels with uniform arrays of objects where all items have the same fields with primitive values. For deeply nested structures or non-uniform data, stick with JSON as it may be more efficient.
What are the best settings for maximum token efficiency?
For maximum token efficiency: use tab delimiters (single character), enable key folding to collapse single-key chains, use minimal indentation (2 spaces), and ensure your data has uniform arrays of objects. Tab delimiters typically save the most tokens.