TOON to YAML Converter

Convert TOON to YAML format with validation

TOON Input

YAML Output

Paste your TOON on the left and the YAML shows up here.

Or drop a file on this box, , or .

What is TOON to YAML Converter?

TOON (Token-Oriented Object Notation) and YAML look like cousins, since both use indentation instead of braces, but a YAML parser will not read TOON. The giveaway is the tabular header: a line like users[3]{id,name,role}: with comma-separated rows under it means nothing to YAML. This page expands those rows into an ordinary YAML list of mappings, the shape a Compose file, a Helm values file or a GitHub Actions matrix expects.

YAML (YAML Ain't Markup Language) guesses types from bare words, and that is where a naive conversion goes wrong. A TOON string like "NO" or "0123" would turn into a boolean or a number if it were written bare, so the output quotes it as 'NO' and '0123'. Indentation is two spaces, list items start with a dash, and a null in TOON stays null in YAML.

Both the TOON decoding and the YAML writing run in this tab, so the values you paste are not stored. When the right panel reports something like Expected 3 tabular rows, but got 2, the row count in the header is wrong; fix it here or open the TOON Validator for a closer look. If the next step is code rather than config, TOON to JSON may be the more useful output.

What Makes This Tool Different

Proper YAML Syntax

Generates valid YAML that follows YAML 1.2 specification. Proper indentation, key-value pairs, and structure ensure compatibility with any YAML parser.

Human Readable

YAML output is clean and readable with proper indentation (2 spaces). Easy to read, edit, and understand – perfect for configuration files.

Type Preservation

Preserves data types correctly – strings, numbers, booleans, null values, arrays, and objects are all converted accurately to YAML format.

File Upload Support

Got a TOON file? Just upload it. Works with .toon and .txt files. No need to copy-paste – just drag and drop or click upload.

Download YAML

One click to download your converted YAML as a .yaml file. Perfect for saving, sharing, or using in YAML-based configuration systems.

Nested Structures

Handles complex nested structures perfectly. Objects within objects, arrays within arrays, and mixed structures are all converted correctly.

How It Works

1

Paste or Upload TOON

Paste TOON into the input editor, or bring in a .toon or .txt file with Upload. The Sample button loads a users[3]{id,name,role} block for Ava Chen, Marcus Okafor and Priya Raman. Unlike the TOML page, this one also takes a document that is just a list or a single value, because YAML can hold either at the top.

2

Automatic Conversion

You do not press anything to convert. Pause typing and the YAML on the right is redrawn: the sample's three rows become users: with three - id: entries under it, a primitive array such as zones[3]: a,b,c turns into three dash items, and nested objects step in by two spaces.

3

Copy or Download

Copy is the one you want when you are pasting a block into a values.yaml or a workflow file that already exists. Download saves the whole result as a .yaml file. Either way, check the indentation level where you paste it, because the output starts at column zero.

When You'd Actually Use This

Configuration Files

Working with applications that use YAML config files? Convert TOON data to YAML for use in Docker Compose, Kubernetes, Ansible, or other YAML-based configuration systems.

CI/CD Pipelines

Many CI/CD systems like GitHub Actions, GitLab CI, or CircleCI use YAML for pipeline configuration. Convert TOON data to YAML for use in these systems.

Infrastructure as Code

Using tools like Terraform, Ansible, or CloudFormation? Convert TOON data to YAML for use in infrastructure configuration files and deployment scripts.

Data Processing

Processing data with tools that prefer YAML format? Convert TOON to YAML for use in data pipelines, ETL processes, or configuration-driven applications.

Common Questions

Is my TOON data stored?

No. The @toon-format/toon package defines how your input is read, and the result is YAML that js-yaml or PyYAML loads cleanly. Both steps run inside the page you are looking at. The text is not sent to a server, so environment values and internal hostnames can be pasted safely.

What TOON formats are supported?

Anything the TOON decoder accepts converts: objects, inline lists, tabular blocks and plain values at the top level. The one thing that trips people up is the length marker. TOON checks that users[3] really has three rows, and if it does not, you get that count error instead of YAML.

Is the YAML valid?

Yes. The YAML follows the YAML 1.2 spec. Strings that YAML would otherwise read as something else (yes, no, 0123) are quoted, and long integers are written with every digit.

How are data types handled?

Each value keeps the type TOON gave it. Numbers stay bare (an ICCID such as 8901240544102066246 keeps all 19 digits), true and false stay booleans, null is written as null, and strings that YAML would otherwise misread get single quotes. A date-looking string like 2026-11-02 is quoted for the same reason, so it stays text.

Can I convert YAML back to TOON?

Yes, in two hops. YAML to JSON gets the data into JSON, then JSON to TOON folds a list of same-shaped mappings back into a tabular block. YAML comments and anchors do not come along, so keep the original file if those matter.

Does it work with large datasets?

For config-sized input you will not notice any wait. A long tabular block grows quite a bit, though: each row turns into several YAML lines with the key names repeated, so a 1,000-row TOON table becomes a YAML file a few times its size. Download it rather than scrolling through the output.

Other TOON Tools You Might Need

YAML is usually the last stop before a config file, so these cover the checks before it and the other formats your pipeline might want instead: