A web application that converts JSON to TOON (Token-Oriented Object Notation) format, designed to reduce LLM token usage by 30-60% compared to standard JSON.
🌐 Live Demo: https://toon-playground.pages.dev
- Real-time JSON to TOON conversion
- Token compression statistics (using GPT tokenizer)
- Configurable delimiter options (comma, tab, pipe)
- Optional length marker support
- Copy to clipboard functionality
- Beautiful, responsive UI
Install dependencies:
bun installRun the development server:
bun run devOpen your browser to http://localhost:3001
Deploy to Cloudflare Pages:
bun run deployTOON (Token-Oriented Object Notation) is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage. It's particularly efficient for uniform complex objects with multiple fields per row.
Learn more: github.com/johannschopplich/toon
- Paste your JSON into the left textarea
- View the token compression statistics at the top
- Choose delimiter and length marker options to optimize compression
- View the TOON output on the right
- Click "Copy" to copy the result to clipboard
Input JSON:
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" }
]
}Output TOON:
users[2]{id,name,role}:
1,Alice,admin
2,Bob,user
This project was created using bun init in bun v1.2.21. Bun is a fast all-in-one JavaScript runtime.