TOON Editor
Edit, validate, and format TOON (Token-Oriented Object Notation) with syntax highlighting. Convert between JSON and TOON, validate syntax, and format token-efficient data for LLMs.
Readme
What is TOON?
TOON (Token-Oriented Object Notation) is a compact data serialization format designed to reduce token usage when sending structured data to Large Language Models (LLMs). Like JSON, it represents objects and arrays, but uses indentation-based structure similar to YAML and tabular formatting similar to CSV. This hybrid approach can reduce token count by 30-60% for uniform arrays while maintaining human readability and full JSON compatibility.
TOON was created specifically for LLM contexts where token costs matter. When you have arrays of similar objects (like user records, product data, or API responses), TOON declares fields once in a header and streams data as rows, eliminating the repetitive key names that make JSON verbose. For deeply nested or non-uniform data, JSON may still be more efficient.
Tool description
TOON Editor is a full-featured code editor for working with TOON-formatted data. It provides syntax highlighting, validation, and formatting capabilities to help you create, edit, and maintain TOON files efficiently. Whether you're preparing data for LLM prompts, validating TOON syntax, or optimizing token usage, this tool offers all the essential features you need in a clean, accessible interface.
Features
- Syntax highlighting - Code editor with proper formatting for TOON data
- Instant validation - Check if your TOON is properly formatted with one click
- Format/Prettify - Automatically indent and organize TOON for readability
- Minify - Compact TOON output to maximize token efficiency
- Full-featured editor - Advanced code editing with line numbers and error detection
Use cases
- LLM prompt optimization - Edit and format TOON data to reduce token usage in prompts
- Token cost reduction - Minimize costs when passing large datasets to AI models
- Data validation - Verify TOON syntax before sending to language models
- Format cleanup - Transform messy TOON into readable or minified format
- Data preparation - Prepare TOON data for storage or transmission