100% Client-Side • Zero Data Collection
TOON = Token-Oriented Object Notation

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.

60%
Token Reduction
Fast
Instant Results
Safe
Private & Secure

See the Difference

Real examples showing immediate token savings

JSON Format

92 tokens
{
  "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

58 tokens
37% saved
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
92
JSON Tokens
58
TOON Tokens
37%
Token Savings
Try Interactive Playground

Test with your own data • No signup required • Works offline

How It Works

Convert your data in three simple steps

1

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
2

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
3

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)

JSON
1250 tokens
100%
YAML
1180 tokens
94%
XML
1450 tokens
116%
TOON
625 tokens
50%
⚡ 50% smaller than JSON
50%
Token Reduction
Average savings across common data structures
$3.50
Cost Savings
Per 1M tokens on GPT-4 (based on 50% reduction)
2x
Faster Processing
Reduced latency with smaller payloads
< 1ms
Conversion Speed
Encode/decode operations in browser

Real-World Use Cases

Use CaseJSONTOONSavings
LLM Chat History3,500 tokens1,750 tokens50%
API Response (100 items)5,200 tokens2,400 tokens54%
Configuration File850 tokens380 tokens55%
Database Export12,000 tokens5,800 tokens52%

* 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

Perfect for:
Chat history compression
RAG document storage
Prompt template optimization
Function calling payloads
Example CodeTypeScript
// 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

Perfect for:
REST API responses
GraphQL query results
Webhook payloads
Real-time data streaming
Example CodeTypeScript
// 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

Perfect for:
Cache optimization
LocalStorage efficiency
Database exports
Backup compression
Example CodeTypeScript
// 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

Perfect for:
Message history storage
Context preservation
Multi-turn conversations
Chatbot training data
Example CodeTypeScript
// 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

Perfect for:
CI/CD pipelines
Build optimization
Config file compression
Test data generation
Example CodeTypeScript
// 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

Perfect for:
ETL pipelines
Data migration
Format conversion
Batch processing
Example CodeTypeScript
// 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);
});
100% Free • No Signup Required

Start Saving on Tokens Today

Join thousands of developers reducing LLM costs by 50%

Convert your data to TOON format and watch your token costs drop instantly

50%
Token Savings
<1ms
Conversion Speed
100%
Privacy First