Dev Tools

LLM

JSON ↔ TOON Converter

Round-trip JSON into TOON outline notation with a single click and keep prompts token-lean.

Converters

JSON to TOON

Parse JSON safely and emit TOON with sorted keys for consistent diffs.

Validation happens in-browser—no payloads leave the page.

TOON output

products[2]{id,in_stock,price,product_name,tags}:
  101,true,299.99,Wireless Noise Cancelling Headphones,[audio, bluetooth, premium]
  102,true,145.5,Ergonomic Mechanical Keyboard,[peripherals, office, typing]

TOON to JSON

Outline notation is parsed with the JSON-only schema to avoid surprises.

Two-space indents keep hierarchies obvious for humans and models.

JSON output

{
  "products": [
    {
      "id": 101,
      "in_stock": true,
      "price": 299.99,
      "product_name": "Wireless Noise Cancelling Headphones",
      "tags": [
        "audio",
        "bluetooth",
        "premium"
      ]
    },
    {
      "id": 102,
      "in_stock": true,
      "price": 145.5,
      "product_name": "Ergonomic Mechanical Keyboard",
      "tags": [
        "peripherals",
        "office",
        "typing"
      ]
    }
  ]
}

Why TOON?

  • Token-lean structure: Dropping braces and commas typically trims prompt token count by 10–20%, leaving more space for actual content.
  • Indent-first clarity: Tree depth is obvious to humans and models, which reduces hallucinated siblings when an LLM rewrites data.
  • Type-disciplined parsing: The converter enforces JSON-safe scalars so TOON stays compatible with APIs and config files.

Why LLM teams like it

TOON is trending with LLM-heavy stacks because it reads like an outline, keeps deltas tiny for review, and round-trips cleanly to JSON for execution. It also plays well with constrained decoding strategies that expect deterministic indentation.

plan:
  summary: "Keep output terse and structured"
  steps:
    - capture goals
    - normalize inputs
    - stream final JSON