YAML Tools
YAML to TOML Converter
Convert between YAML and TOML configuration formats.
Loading tool…
What is YAML ⇄ TOML?
A bidirectional converter between YAML and TOML, the two dominant human-readable config formats, so you can move configs without hand-transcribing.
How it works
YAML is parsed with js-yaml and serialized with the smol-toml library; TOML→YAML reverses that. Types that TOML can't express are reported as errors.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Config migration
Convert a YAML config to TOML for tools like Cargo and pyproject — with nested maps and arrays handled correctly.
Common mistakes
Types that don't map cleanly
YAML's flexible scalars can become ambiguous in TOML. The converter flags values that need explicit typing.
Frequently asked questions
Are comments preserved?
Yes — comments are carried over to the TOML output where TOML's syntax allows.
Does it handle anchors and aliases?
Anchors are resolved to their expanded values before conversion.