TOON to YAML Converter

Input TOON

Output YAML

Your YAML appears here as you type.

Paste data to see token savings

Convert TOON to YAML with our free online converter.

Example: TOON input and real YAML output

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

TOON input (186 characters)
employees[4]{id,name,dept,salary,remote}:
  1,Alice Chen,Engineering,128000,true
  2,Bob Okafor,Sales,86000,false
  3,Carla Diaz,Engineering,119000,true
  4,Dan Weiss,Support,64000,false
YAML output (355 characters)
employees:
  - id: 1
    name: Alice Chen
    dept: Engineering
    salary: 128000
    remote: true
  - id: 2
    name: Bob Okafor
    dept: Sales
    salary: 86000
    remote: false
  - id: 3
    name: Carla Diaz
    dept: Engineering
    salary: 119000
    remote: true
  - id: 4
    name: Dan Weiss
    dept: Support
    salary: 64000
    remote: false

YAML output is 91% larger than the TOON input. The same data is 324 characters as minified JSON and 532 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.

TOON to YAML: what changes

  • Reading TOON: TOON is strict about structure: the [N] in an array header must match the number of rows, and each row needs exactly as many values as the {field} list. Hand-edited TOON that breaks either rule fails to decode.
  • Writing YAML: Strings that would otherwise change type on re-read, such as '2021' or '1.0', are quoted. No comments are generated.

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 →

About YAML

YAML is a human-friendly data serialization format. It uses indentation instead of brackets, making configuration files more readable.

  • ✓Human readable
  • ✓No punctuation
  • ✓Supports comments
  • ✓Great for config
Full YAML Documentation →

Why Convert TOON to YAML?

Use YAML for configuration files, especially in DevOps (Docker, Kubernetes, GitHub Actions). It's more readable than JSON but can have ambiguity with indentation.

TOON to YAML: Frequently Asked Questions

How do I convert TOON to YAML?

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

Is the TOON to YAML converter free?

Yes. Converting TOON to YAML 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 TOON to YAML?

Convert TOON to YAML with our free online converter.

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

Strings that would otherwise change type on re-read, such as '2021' or '1.0', are quoted. No comments are generated.

Is my data safe when I convert TOON to YAML?

Yes. The TOON to YAML 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.