TOML to YAML

Parse and convert TOML to YAML.

Enable JavaScript to use the interactive tool. The guide below explains how it works.

TOML to YAML Converter

What it does

This tool reads a TOML document and writes out the same data as YAML. Paste TOML on the left and the YAML equivalent appears on the right. Invalid TOML is flagged and produces no output.

Why someone uses it

Step-by-step instructions

  1. Paste your TOML into the input.
  2. Fix any "Provided TOML is not valid" message.
  3. Copy the YAML from the output.

Examples

Input:

name = "demo"

[database]
host = "localhost"
ports = [5432, 5433]

Output:

name: demo
database:
  host: localhost
  ports:
    - 5432
    - 5433

Understanding the results

Tables become nested mappings, and TOML arrays become YAML sequences with a dash for each item. YAML relies on indentation, so nesting depth shows as indentation rather than as [section.headers]. Strings that could be confused with other types (for example "true" or "123") may be quoted in the output so their type is preserved. Comments in the TOML are not carried over, and TOML date-times are written as timestamps.

FAQs

Common mistakes

Use cases

Related tools

All tools

Guides and articles