JSON to TOON Converter

Input JSON

Output TOON

Your TOON appears here as you type.

users[3]{id,name,role}:
  1,Alice,admin
  2,Bob,user
  3,Cleo,user
Field names once, then one row per record.

Paste data to see token savings

TOON uses about 43% fewer tokens than JSON on average (42.6% in the official TOON v4.1 benchmark).

Example: JSON input and real TOON output

The output below was generated by the same conversion code the converter uses, run on this sample when the page was built.

JSON input (689 characters)
{
  "orders": [
    {
      "id": 1001,
      "status": "shipped",
      "total": 59.9,
      "customer": {
        "name": "Ana Ruiz",
        "country": "ES"
      },
      "items": [
        "SKU-104",
        "SKU-221"
      ]
    },
    {
      "id": 1002,
      "status": "pending",
      "total": 18.5,
      "customer": {
        "name": "Jonas Berg",
        "country": "SE"
      },
      "items": [
        "SKU-310"
      ]
    },
    {
      "id": 1003,
      "status": "shipped",
      "total": 112,
      "customer": {
        "name": "Mei Tanaka",
        "country": "JP"
      },
      "items": [
        "SKU-104",
        "SKU-415",
        "SKU-502"
      ]
    }
  ]
}
TOON output (409 characters)
orders[3]:
  - id: 1001
    status: shipped
    total: 59.9
    customer:
      name: Ana Ruiz
      country: ES
    items[2]: SKU-104,SKU-221
  - id: 1002
    status: pending
    total: 18.5
    customer:
      name: Jonas Berg
      country: SE
    items[1]: SKU-310
  - id: 1003
    status: shipped
    total: 112
    customer:
      name: Mei Tanaka
      country: JP
    items[3]: SKU-104,SKU-415,SKU-502

TOON output is 41% smaller than the JSON input. The same data is 375 characters as minified JSON and 689 as pretty-printed JSON. Sizes are character counts, not tokens: token counts depend on the model's tokenizer (see the tokenizer comparison). Across larger datasets, TOON averages about 43% fewer tokens than JSON (42.6%) according to the official TOON benchmark.

JSON to TOON: what changes

  • On average TOON uses about 43% fewer tokens than JSON (42.6% in the official TOON v4.1 benchmark), from about 33% on mixed/nested structures to about 59% on flat uniform tables. This sample has nested customer objects inside each order, so the orders stay in list form instead of becoming a table.
  • Reading JSON: Input must be strict JSON: no comments, trailing commas, or single quotes. If it came from an LLM or a log file, run it through the JSON repair tool first.
  • Writing TOON: TOON saves the most on arrays of objects that share the same fields: they collapse into one header plus one row per record. Nested or non-uniform objects are written as indented key: value lines and save much less.

About JSON

JavaScript Object Notation is the most widely used data interchange format. Lightweight, easy to parse, and supported by every programming language.

  • ✓Universal compatibility
  • ✓Easy to parse
  • ✓Great for APIs
  • ✓Native in JavaScript
Full JSON Documentation →

About TOON

TOON (Token-Oriented Object Notation) is an indentation-based format designed for LLM prompts. It uses about 43% fewer tokens than JSON on average (42.6% in the official TOON v4.1 benchmark), ranging from about 33% on mixed/nested structures to about 59% on flat uniform tables.

  • ✓About 43% fewer tokens than JSON on average
  • ✓Tabular rows for uniform arrays
  • ✓Lossless round trip to JSON
  • ✓Readable without tooling
Full TOON Documentation →

Why Convert JSON to TOON?

Use TOON when building LLM-powered applications, optimizing API costs, or when you need compact, readable data for AI models.

JSON to TOON: Frequently Asked Questions

How do I convert JSON to TOON?

Paste your JSON into the editor on json2toon.co. The tool detects the input and produces TOON instantly, then you copy the result. Conversion runs entirely in your browser, so nothing is uploaded to a server.

Is the JSON to TOON converter free?

Yes. Converting JSON to TOON on json2toon.co is free with no account, signup, or usage limit. A free public API is also available for automated, programmatic conversion.

Why convert JSON to TOON?

TOON uses about 43% fewer tokens than JSON on average (42.6% in the official TOON v4.1 benchmark).

What should I watch out for when converting JSON to TOON?

On average TOON uses about 43% fewer tokens than JSON (42.6% in the official TOON v4.1 benchmark), from about 33% on mixed/nested structures to about 59% on flat uniform tables. This sample has nested customer objects inside each order, so the orders stay in list form instead of becoming a table.

Is my data safe when I convert JSON to TOON?

Yes. The JSON to TOON conversion happens client-side in your browser. Your source data stays on your device and is never sent to or stored on a server, which makes it safe for private or sensitive payloads.