{ }jsonkit
Format
Validate
Convert
Query
Generate

YAML to TOML converter

Convert config data between YAML 1.2 and TOML.
88 B · paste or drop a file
1 2 3 4 5 6 7 8
✓ complete88 B → 95 B0.0 ms

About YAML ⇄ TOML

The YAML to TOML converter works in both directions. Where the two formats differ, it reports an error instead of making up a value.

How it works

YAML 1.2 to TOML

One YAML mapping document is resolved, with a cap on aliases, and written as TOML keys, tables and arrays of tables. Multi-document files and roots that aren't mappings are rejected with a clear error.

TOML to YAML

TOML dotted keys, tables, arrays and values become a YAML 1.2 mapping with two-space indentation.

Nulls are not converted

TOML has no null value. A YAML null causes an explicit error instead of turning into an empty string or disappearing.

Frequently asked questions

Are comments preserved?

No. The conversion works on data, and comments and formatting are not part of the data.

What happens to YAML anchors?

Anchors and aliases are expanded into values, because TOML has no reference syntax.

Can it convert multiple YAML documents?

No. A TOML file has one root table, so provide one YAML mapping document.

Sources & last verified

We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.

Found a wrong result or an outdated claim? Report an error and we will check it again.