YAML to TOML
What is a Yaml To Toml?
YAML and TOML are both popular configuration formats. If you are moving settings into a Rust Cargo.toml, a Python pyproject.toml, a Hugo or Netlify config, or any tool that prefers TOML, this converter translates your YAML structure into equivalent TOML.
How to use it
- Paste YAML.
- Copy the generated TOML.
Example
YAML input:
project:
name: analytics
version: 1.4.0
authors:
- Asha Rao
tool:
ruff:
line-length: 100
plugins:
- name: csv
enabled: true
- name: parquet
enabled: falseTOML output:
[project]
name = 'analytics'
version = '1.4.0'
authors = ['Asha Rao']
[tool.ruff]
line-length = 100
[[plugins]]
name = 'csv'
enabled = true
[[plugins]]
name = 'parquet'
enabled = false(TOML output normally uses double quotes for strings.)
Mapping rules
- Nested mappings become
[table]and[table.subtable]sections. - Lists of mappings become arrays of tables with
[[name]]. - Lists of scalars become inline arrays.
- Numbers, booleans and strings keep their types.
Limitations
- TOML has no null. Keys with null values in YAML must be removed or given a value.
- YAML anchors and aliases are expanded, because TOML has no references.
- Comments are not preserved.
- Check that values like
1.10were quoted in the YAML, otherwise they become the number 1.1.
Frequently Asked Questions
How do nested YAML objects become TOML?
They become table sections such as [tool.ruff].
What happens to null values?
TOML has no null type, so null values must be removed or replaced before converting.
How are lists of objects converted?
They become TOML arrays of tables, written with double square brackets.
Are YAML anchors kept?
No. TOML has no references, so anchors and aliases are expanded into full values.
When should I choose TOML over YAML?
TOML suits flat or moderately nested configuration that people edit by hand, such as package manifests. Its explicit syntax avoids YAML indentation and type-guessing surprises. YAML is better for deeply nested data such as Kubernetes manifests.
Is the conversion done locally?
Yes. The YAML is parsed and converted in your browser, so configuration files are never uploaded to a server.