JSON to TOON Converter

Convert JSON to Token-Oriented Object Notation and reduce token usage by up to 60%

JSON Input
TOON Output

JSON Tokens

0

TOON Tokens

0

Token Reduction

0%

Estimated Cost Savings

Enter JSON to see potential cost savings

Quick Guide

What is TOON?

Token-Oriented Object Notation (TOON) is a compact, human-readable encoding of the JSON data model designed specifically for Large Language Models. It combines YAML's indentation-based structure for nested objects with CSV-style tabular layout for uniform arrays, resulting in 30-60% fewer tokens compared to standard JSON.

How It Works

JSON (59 tokens)

{
  "users": [
    {
      "id": 1,
      "name": "Alice",
      "role": "admin"
    },
    {
      "id": 2,
      "name": "Bob",
      "role": "user"
    }
  ]
}

TOON (24 tokens) - 59.3% reduction

users[2]{id,name,role}:
  1,Alice,admin
  2,Bob,user

Options Explained

Indent Spaces

Number of spaces per indentation level. Default is 2 spaces.

Key Folding

Collapses single-key wrapper chains into dotted paths (e.g., data.metadata.items). 'Safe' only folds valid identifiers.

Delimiter

Character used to separate array values and tabular rows. Options: comma, pipe, or tab.

Flatten Depth

Maximum number of segments to fold when key folding is enabled. Default is Infinity.

When to Use TOON

Best For

  • • Uniform arrays of objects
  • • LLM prompts with structured data
  • • Token cost optimization
  • • API responses with repeated structures

Avoid When

  • • Deeply nested structures (use JSON)
  • • Non-uniform data
  • • Pure tabular data (use CSV)
  • • Existing JSON pipelines