Token-OptimizedData Conversion
Convert JSON, CSV, YAML, and XML to TOON format. Reduce LLM token usage by up to 60% and save on API costs.
Complete Toolset
Everything you need to work with TOON format. All tools run entirely in your browser.
JSON to TOON
Convert JSON to token-optimized format
TOON to JSON
Convert TOON back to JSON format
CSV Converter
Bidirectional CSV and TOON conversion
YAML Converter
Convert YAML to TOON format
XML Converter
Convert XML to TOON format
Playground
Compare all formats side-by-side
Token Counter
Analyze and count tokens in any format
Validator
Validate TOON syntax and structure
Batch Converter
Convert multiple files at once
API Tester
Test TOON with API endpoints
Documentation
Learn about TOON format
Downloads
Get CLI tools and libraries
Your Privacy is Guaranteed
All conversions happen directly in your browser. No data is ever sent to our servers. Works completely offline. Open source and auditable.
See the Difference
Real examples showing immediate token savings
JSON Format
{
"id": 12345,
"username": "john_doe",
"email": "john@example.com",
"profile": {
"firstName": "John",
"lastName": "Doe",
"age": 30,
"city": "San Francisco"
},
"preferences": {
"theme": "dark",
"notifications": true,
"language": "en"
}
}TOON Format
id: 12345
username: john_doe
email: john@example.com
profile:
firstName: John
lastName: Doe
age: 30
city: San Francisco
preferences:
theme: dark
notifications: true
language: enTest with your own data • No signup required • Works offline
How It Works
Convert your data in three simple steps
Input Your Data
Paste JSON, CSV, YAML, or XML directly into the editor. Or upload files with drag & drop.
- Supports multiple formats
- Syntax highlighting
- Instant validation
Auto-Convert to TOON
Our encoder analyzes your data structure and converts it to optimized TOON format instantly.
- Smart compression
- Structure preservation
- No data loss
Copy or Download
Get your optimized TOON output. Copy to clipboard, download as file, or use directly in your app.
- Multiple export options
- Token count analysis
- Ready for LLMs
Why Choose TOON Tools?
Lightning Fast
Conversion happens in milliseconds using optimized WebAssembly
100% Private
All processing happens in your browser. No data ever leaves your device
Open Source
Built on the official @toon-format/toon library with full transparency
Proven Performance
Real-world benchmarks show consistent 50%+ token savings
Format Comparison (Same Dataset)
Real-World Use Cases
| Use Case | JSON | TOON | Savings |
|---|---|---|---|
| LLM Chat History | 3,500 tokens | 1,750 tokens | 50% |
| API Response (100 items) | 5,200 tokens | 2,400 tokens | 54% |
| Configuration File | 850 tokens | 380 tokens | 55% |
| Database Export | 12,000 tokens | 5,800 tokens | 52% |
* Token counts measured using GPT-3.5 tokenizer (cl100k_base)
Use Cases
From LLM apps to APIs - TOON saves tokens everywhere
LLM Applications
Reduce token costs and improve context window efficiency
// Before: 450 tokens
const context = JSON.stringify({
"conversation": [...messages],
"metadata": {...}
});
// After: 225 tokens (50% saved!)
const context = encodeToon({
conversation: [...messages],
metadata: {...}
});API Development
Faster responses with smaller payloads
// API Response
app.get('/users', (req, res) => {
const users = getUsersFromDB();
// Send TOON format (50% smaller)
res.set('Content-Type', 'application/toon');
res.send(encodeToon(users));
// Clients can easily decode:
// const users = decodeToon(response);
});Data Storage
Store more data in less space
// Store in localStorage
const data = fetchLargeDataset();
// Traditional JSON: 5MB
localStorage.setItem('data',
JSON.stringify(data));
// TOON format: 2.5MB (50% saved!)
localStorage.setItem('data',
encodeToon(data));Chat & Messaging
Optimize message history and conversation data
// Store conversation efficiently
const conversation = [
{ role: "user", content: "..." },
{ role: "assistant", content: "..." },
// ... more messages
];
// 60% smaller than JSON
const compressed = encodeToon(conversation);
await db.saveConversation(userId, compressed);Development Tools
Integrate TOON into your development workflow
// package.json or any config
{
"scripts": {
"build": "toon-convert config.json",
"optimize": "toon-batch src/data"
},
"dependencies": {
"@toon-format/toon": "^0.7.3"
}
}Data Processing
Process and transform data efficiently
// Batch convert files
import { encode } from '@toon-format/toon';
import fs from 'fs';
const files = fs.readdirSync('./data');
files.forEach(file => {
const json = JSON.parse(fs.readFileSync(file));
const toon = encode(json);
fs.writeFileSync(file + '.toon', toon);
});