Token-Oriented Object Notation: A compact, human-readable encoding of JSON that minimizes tokens for LLM input

Live Conversion
📝 JSON Input
Tokens
0
Characters
0
TOON Output
Convert JSON to see TOON output...
Tokens
0
Saved
0
📊

Token Efficient

Save ~40% tokens compared to JSON while maintaining 100% data fidelity and lossless round-trips.

🎯

LLM-Friendly

Explicit [N] lengths and {fields} headers give models clear schema guardrails for better parsing.

🛤️

Tabular Arrays

Uniform arrays collapse into CSV-style tables with fields declared once and values streamed line by line.

🔁

JSON Compatible

Encodes the same objects, arrays, and primitives as JSON with deterministic, lossless conversion.

How to Use This Tool

1

Paste Your JSON

Copy your JSON data and paste it into the left panel. You can also select from the example dropdown to see different data structures in action.

2

See TOON Output

The TOON format appears instantly on the right. Watch the token counter to see how much you're saving compared to JSON.

3

Copy or Download

Use the copy button to grab the TOON output for your LLM prompts, or download it as a .toon file for later use.

💡 Pro Tips

  • Format JSON: Click the format button or press Cmd/Ctrl + Shift + F to prettify messy JSON
  • Quick Clear: Press Cmd/Ctrl + K to clear the input and start fresh
  • Fast Copy: Press Cmd/Ctrl + Shift + C to copy TOON output to clipboard
  • Best Results: TOON works best with uniform arrays of objects (like database records or API responses)
  • Token Savings: Typical savings are 30-50% for structured data, perfect for reducing LLM API costs

Common Use Cases

🤖
LLM Context Windows

Fit more data in your prompts while using fewer tokens

💰
Reduce API Costs

Save money on token-based pricing from OpenAI, Anthropic, etc.

📊
Data Analysis

Send datasets to LLMs for analysis with minimal overhead

🔄
Data Transfer

Compact format for moving data between systems efficiently

About This Tool

This playground was built to make it easy to convert JSON to TOON format and see the token savings in real-time. TOON (Token-Oriented Object Notation) is a compact, human-readable encoding of JSON specifically designed to minimize tokens for Large Language Model input.

Whether you're working with ChatGPT, Claude, Gemini, or any other LLM, TOON helps you fit more data into your context window while reducing costs. The format combines YAML's indentation-based structure with CSV-style tabular arrays for maximum efficiency.

DS

Built by Deep Shah

Solutions Architect