TOON Examples

Real-world use cases and conversion examples.

Employee Database

JSON (126 Tokens)

{
  "employees": [
    {
      "id": 1001,
      "name": "Alice Chen",
      "department": "Engineering",
      "salary": 95000,
      "active": true
    },
    {
      "id": 1002,
      "name": "Bob Smith",
      "department": "Sales",
      "salary": 75000,
      "active": true
    },
    {
      "id": 1003,
      "name": "Carol Johnson",
      "department": "Engineering",
      "salary": 105000,
      "active": false
    }
  ]
}

TOON (68 Tokens - 46% Reduction)

employees[3]{id,name,department,salary,active}:
  1001,Alice Chen,Engineering,95000,true
  1002,Bob Smith,Sales,75000,true
  1003,Carol Johnson,Engineering,105000,false

E-Commerce Order

JSON (243 Tokens)

{
  "order": {
    "id": "ORD-2025-001",
    "customer": {
      "name": "John Doe",
      "email": "john@example.com"
    },
    "items": [
      {
        "sku": "LAPTOP-001",
        "name": "MacBook Pro",
        "price": 2499.99,
        "quantity": 1
      },
      {
        "sku": "MOUSE-042",
        "name": "Magic Mouse",
        "price": 79.99,
        "quantity": 2
      }
    ],
    "total": 2659.97,
    "status": "shipped"
  }
}

TOON (157 Tokens - 35% Reduction)

order:
  id: ORD-2025-001
  customer:
    name: John Doe
    email: john@example.com
  items[2]{sku,name,price,quantity}:
    LAPTOP-001,MacBook Pro,2499.99,1
    MOUSE-042,Magic Mouse,79.99,2
  total: 2659.97
  status: shipped

API Response - GitHub Repositories

JSON (198 Tokens)

{
  "repos": [
    {
      "name": "next.js",
      "stars": 125000,
      "language": "TypeScript",
      "active": true
    },
    {
      "name": "react",
      "stars": 230000,
      "language": "JavaScript",
      "active": true
    },
    {
      "name": "vue",
      "stars": 210000,
      "language": "TypeScript",
      "active": true
    }
  ],
  "fetched": "2025-01-15T10:30:00Z"
}

TOON (109 Tokens - 45% Reduction)

repos[3]{name,stars,language,active}:
  next.js,125000,TypeScript,true
  react,230000,JavaScript,true
  vue,210000,TypeScript,true
fetched: 2025-01-15T10:30:00Z

Configuration File

JSON (152 Tokens)

{
  "app": {
    "name": "MyApp",
    "version": "2.1.0",
    "port": 3000,
    "debug": false
  },
  "database": {
    "host": "localhost",
    "port": 5432,
    "name": "myapp_db",
    "pool": {
      "min": 2,
      "max": 10
    }
  },
  "features": ["auth", "api", "websockets"]
}

TOON (97 Tokens - 36% Reduction)

app:
  name: MyApp
  version: 2.1.0
  port: 3000
  debug: false
database:
  host: localhost
  port: 5432
  name: myapp_db
  pool:
    min: 2
    max: 10
features[3]: auth,api,websockets

Analytics Dashboard Data

JSON (287 Tokens)

{
  "dashboard": {
    "title": "Monthly Analytics",
    "period": "2025-01",
    "metrics": [
      {
        "date": "2025-01-01",
        "views": 1250,
        "clicks": 340,
        "conversions": 28
      },
      {
        "date": "2025-01-02",
        "views": 1420,
        "clicks": 380,
        "conversions": 32
      },
      {
        "date": "2025-01-03",
        "views": 1180,
        "clicks": 310,
        "conversions": 25
      }
    ],
    "summary": {
      "total_views": 3850,
      "total_clicks": 1030,
      "conversion_rate": 2.21
    }
  }
}

TOON (174 Tokens - 39% Reduction)

dashboard:
  title: Monthly Analytics
  period: 2025-01
  metrics[3]{date,views,clicks,conversions}:
    2025-01-01,1250,340,28
    2025-01-02,1420,380,32
    2025-01-03,1180,310,25
  summary:
    total_views: 3850
    total_clicks: 1030
    conversion_rate: 2.21

LLM Prompt Context

JSON (412 Tokens)

{
  "context": {
    "task": "Code Review",
    "repo": "my-project",
    "branch": "feature/new-api"
  },
  "files": [
    {
      "path": "src/api/users.ts",
      "status": "modified",
      "additions": 45,
      "deletions": 12
    },
    {
      "path": "src/api/auth.ts",
      "status": "new",
      "additions": 120,
      "deletions": 0
    },
    {
      "path": "tests/api.test.ts",
      "status": "modified",
      "additions": 80,
      "deletions": 5
    }
  ],
  "instructions": "Review for security issues and best practices"
}

TOON (234 Tokens - 43% Reduction)

context:
  task: Code Review
  repo: my-project
  branch: feature/new-api
files[3]{path,status,additions,deletions}:
  src/api/users.ts,modified,45,12
  src/api/auth.ts,new,120,0
  tests/api.test.ts,modified,80,5
instructions: Review for security issues and best practices

Try It Yourself

Use the Converter Tool to convert your own JSON data to TOON and see the token savings!

Token Counting

Token counts in these examples use the GPT-5 o200k_base tokenizer. Actual savings may vary by:

  • Model and tokenizer used
  • Data structure and uniformity
  • Field name lengths
  • Delimiter choice (comma vs tab)

For maximum savings, use the Minifier Tool with tab delimiters.