What is TOON (Token-Oriented Object Notation)?

TOON is a compact, human-readable data format designed specifically for working with Large Language Models (LLMs). It reduces token usage by 30-60% compared to JSON while maintaining readability and structure. TOON uses indentation-based formatting similar to YAML and eliminates redundant punctuation by declaring field names once for tabular data, making it ideal for passing structured data to AI models where token costs matter.

Tool description

The Random TOON Generator creates realistic mock data in TOON format using the Faker.js library. Define your data structure using a JSON template with Faker.js placeholders (like {{person.firstName}} or {{number.int(1,100)}}), and the tool generates multiple records of dummy data formatted as token-efficient TOON. Perfect for testing LLM applications, creating sample datasets, or generating mock API responses in a format that's both AI-friendly and cost-effective.

Examples

Input template:

[
  {
    "id": "{{string.uuid}}",
    "firstName": "{{person.firstName}}",
    "email": "{{internet.email}}",
    "age": "{{number.int(18,80)}}"
  }
]

Output (5 records with comma delimiter):

[5]{id,firstName,email,age}:
  a1b2c3d4-e5f6-7890-abcd-ef1234567890,Alice,alice.smith@example.com,45
  b2c3d4e5-f6a7-8901-bcde-fa2345678901,Bob,bob.jones@test.org,28
  c3d4e5f6-a7b8-9012-cdef-ab3456789012,Charlie,charlie.brown@demo.net,67
  d4e5f6a7-b8c9-0123-defa-bc4567890123,Diana,diana.wilson@sample.io,33
  e5f6a7b8-c9d0-1234-efab-cd5678901234,Eve,eve.davis@mock.com,52

Features

  • Faker.js integration: Use 100+ Faker.js methods for realistic dummy data (names, emails, addresses, dates, numbers, etc.)
  • Template-based generation: Define your data structure once using JSON with placeholders
  • Multiple delimiter options: Choose between comma (default), tab, or pipe delimiters for optimal token efficiency
  • Batch generation: Create multiple records at once with automatic array merging
  • Token-efficient output: Reduce LLM token costs by 30-60% compared to equivalent JSON data
  • Tabular format: Automatically uses TOON's efficient tabular format for uniform data structures
  • Live preview: See your TOON output update as you modify the template

Use Cases

  • Generate mock user data for testing AI chatbots or LLM applications
  • Create sample datasets for training or testing data pipelines with reduced token costs
  • Generate test data for API development that will be consumed by LLMs
  • Create realistic demo data for presentations or documentation using AI-friendly formats
  • Build mock databases for prototyping LLM-powered applications

Supported Faker.js placeholders

Common placeholders you can use in templates:

  • Person: {{person.firstName}}, {{person.lastName}}, {{person.fullName}}, {{person.jobTitle}}
  • Internet: {{internet.email}}, {{internet.url}}, {{internet.userName}}, {{internet.ip}}
  • Location: {{location.city}}, {{location.country}}, {{location.zipCode}}, {{location.streetAddress}}
  • Company: {{company.name}}, {{company.catchPhrase}}, {{company.industry}}
  • Finance: {{finance.amount}}, {{finance.accountNumber}}, {{finance.creditCardNumber}}
  • Date: {{date.past}}, {{date.future}}, {{date.recent}}
  • Numbers: {{number.int(min,max)}}, {{number.float(min,max,precision)}}
  • Text: {{lorem.sentence}}, {{lorem.paragraph}}, {{lorem.words(count)}}
  • IDs: {{string.uuid}}, {{string.alphanumeric(length)}}, {{string.numeric(length)}

For a complete list of available Faker.js methods, visit: https://fakerjs.dev/api/

Delimiter options

  • Comma (,): Standard delimiter, good for most use cases
  • Tab (\t): Often more token-efficient, single character that tokenizes well
  • Pipe (|): Alternative delimiter, useful when data contains commas