YAML ↔ TOML
Convert YAML to TOML and TOML back to YAML, locally.
Move config between YAML and TOML formats
This tool converts a YAML document into TOML, the format Rust's Cargo and several Python tools expect for config, and converts TOML back into YAML. It's useful when a project standardizes on one config format but a dependency, template or example ships in the other, and you need a quick, correct rewrite rather than a manual rebuild. YAML and TOML config files can carry hostnames or credentials, so keeping the conversion local rather than pasted into a web form matters.
How to use the YAML ↔ TOML
- Paste YAML into the left panel, or click Example to load a sample document.
- Use the YAML → TOML and TOML → YAML toggle to pick the conversion direction.
- Read the converted result in the right panel; parse errors appear in the input panel's footer.
- Click the swap arrow between the panels to flip direction and keep editing the result.
- Copy the output or use the send-to menu to pass it into another tool.
TOML requires a table at the document root, so the YAML side must be a mapping of keys to values, not a top-level list or scalar; converting a YAML sequence or bare string will fail with an explanatory error.
Nested YAML mappings become TOML tables written as bracketed section headers, and lists of mappings become arrays of tables, so a deeply nested YAML file can produce a TOML file with several `[[section]]` blocks.
Frequently asked questions
- Can I convert a YAML list to TOML directly?
- No, TOML needs a table, meaning a set of key-value pairs, at the top level, so a YAML document whose root is a list or a single scalar value will fail to convert; wrap it under a key first.
- Does converting YAML to TOML keep comments?
- No, comments in the source YAML are discarded during parsing and won't reappear in the generated TOML, since the conversion works on the parsed data structure, not the original text.
- Are numbers and booleans preserved across the conversion?
- Yes, YAML's native integers, floats and booleans map to TOML's equivalent types rather than being quoted as strings, and the same holds converting from TOML back to YAML.
- Is my config file sent to a server during conversion?
- No, both directions run through a YAML and a TOML library loaded into your browser tab, so config values like internal hostnames stay on your device the whole time.