TOML to YAML
Parse and convert TOML to YAML.
About TOML to YAML
Converts a TOML document into YAML. Useful when moving configuration from a TOML-based tool to one that expects YAML, or to view a TOML file in the more familiar YAML layout.
When you would use it
- Turning a TOML config into a YAML file for Kubernetes, Compose, CI or Ansible.
- Reading a dense TOML file with many nested tables as an indented YAML tree.
- Preparing YAML examples from TOML documentation.
How to use it
- Paste the TOML into the left field.
- Read the YAML on the right.
- Copy the result.
Things worth knowing
- TOML dates and times become ISO 8601 timestamps such as 1979-05-27T07:32:00.000Z, which YAML also understands as timestamps.
- Table headers such as [server.tls] become nested mappings in YAML, and [[items]] arrays of tables become lists of mappings.
- Comments are dropped. The output uses two-space indentation.
- Strings that YAML would read as another type (true, 1.0, null) are quoted automatically to preserve their meaning.
Frequently asked questions
- Why does the YAML quote some of my values?
- Only values that would change type when read back as YAML are quoted, for example the string "on" or a number stored as a string. The data stays identical.
- Can I go the other way?
- Yes, with the YAML to TOML tool, as long as the document is a mapping at the top level; null values are dropped.