YAML ↔ TOML Converter
Paste YAML or TOML and get the other one. The direction is detected for you. Comments are not kept: every comment line is listed below the output so you can put it back by hand. Nothing is uploaded.
Convert YAML to TOML and TOML to YAML in your browser, handy for pyproject.toml, Cargo.toml and Hugo configs. Values that TOML cannot hold, such as null, are flagged, and whole-number floats in TOML become integers in YAML (each one is listed), and nothing you paste is uploaded.
Detected: —
Warnings
Comments not kept
How to use the YAML ↔ TOML Converter
- Paste your YAML or TOML into the input, or load an example. Auto detects which one it is; use the direction buttons to override it.
- The result updates as you type. Read the Warnings list for values that changed type or could not be kept, and Comments not kept for the comment lines that were left behind.
- Press Copy or Download. The file is named converted.toml or converted.yaml to match the output.
Built on js-yaml 4.1.0 (MIT) and smol-toml 1.3.1 (BSD-3-Clause), both bundled with this site and run locally. Whole-number floats in TOML to YAML (for example 2.0 or 1e2) become integers (2, 100) and each one is listed.
Frequently asked questions
How do I convert YAML to TOML?
Paste the YAML into the input. With Auto selected, the direction is detected and the TOML appears instantly; press Copy or Download. You can also force YAML to TOML with the direction buttons.
Are comments kept when converting?
No. Neither parser keeps comments, so they cannot be carried across. Every comment line in your input is listed under Comments not kept with its line number, so you can copy them back by hand.
Why did a whole-number float become an integer?
In TOML to YAML, a float whose value is a whole number, such as 2.0, 1e2 or +3.0, is read as the number and YAML writes it as an integer (2, 100, 3). Each line that holds one is listed under Warnings. If the type matters, quote the value or check the result before you use it.
What happens to values TOML cannot hold?
TOML has no null, so a YAML null is listed under Warnings with its path. Dates, large integers, keys with dots or spaces and a top-level list get the same treatment: they are converted where possible and flagged when they change.
Is my file uploaded anywhere?
No. The conversion runs entirely in your browser. Nothing you paste is sent to a server, and the text is never stored or added to the URL.
Fun facts about YAML and TOML
- TOML stands for Tom’s Obvious, Minimal Language and was created by Tom Preston-Werner, a GitHub co-founder.
- YAML began as “Yet Another Markup Language” and was later renamed “YAML Ain’t Markup Language”.
- TOML has no null value, which is one reason a YAML file cannot always be converted without changes.
- Python packaging uses TOML for pyproject.toml, and Rust uses it for Cargo.toml.