TXT · Text & Data tools

TOML to YAML Converter

Input · TOML
Output · YAML
0 Bin0 Bout0lines in0keysEmptyTOML
Go to the full Data Format Converter

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

TOML to YAML

Convert TOML to YAML. Paste TOML on the left; the YAML output builds on the right as you type.

[package]
name = "vayce"
version = "1.0"

[[servers]]
host = "a.example.com"

[[servers]]
host = "b.example.com"

becomes

package:
  name: vayce
  version: "1.0"
servers:
  - host: a.example.com
  - host: b.example.com

[package] becomes a nested mapping under package. The two [[servers]] blocks, TOML’s array-of-tables syntax, become a YAML sequence with one mapping per block, in the order they appear in the source.

Quoting choices

The YAML serializer quotes version: "1.0" because an unquoted 1.0 would read as a YAML float, losing the distinction TOML made by storing it as a string. Values TOML typed as real numbers, like port = 8080, come out unquoted, since there’s no ambiguity there.

Migrating from Rust or Python configs

TOML to YAML shows up most when a project’s Cargo.toml, pyproject.toml, or config.toml needs to feed a CI pipeline or a tool that reads YAML, GitHub Actions and many Kubernetes-adjacent tools among them. Paste the whole file; TOML comments are dropped during parsing, the same limit YAML to TOML has in the other direction.

After the conversion

If the YAML needs reformatting, comment annotations, or a specific indentation, the YAML formatter picks up from here without needing the original TOML again.

Frequently Asked Questions

A [table] header becomes a nested mapping under that key, with its fields indented underneath, matching how TOML's dotted table names nest in the source.

It becomes a YAML sequence, one dash-prefixed mapping per [[servers]] block, in the order the blocks appear.

Yes. TOML's parser returns typed values, so an integer stays an unquoted number in the YAML and a datetime is written out as an ISO 8601 string.

The input pane reports the line and column TOML's parser stopped at. A duplicate key in the same table and a table redefined after it was already used are the most common causes.

No. Comments are discarded while TOML is parsed; if you need the same notes in the YAML, they'd need to be added back with # manually.

Jump straight to a conversion

Full Data Format Converter tool

Explore Our Tools

Browse all tools