Skip to content
ToolPlankDEV
JSON Tools
100% In-Browser Execution

Updated:

TOML to YAML Converter

Paste TOML and get YAML as you type. This toml to yaml converter points to the line and column of TOML errors, keeps big integers exact, lists every date it converts and never uploads your config.

Options:

TOML

Input
0 chars · 0 lines

YAML

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Notes

Converted dates and large integers are listed here with their TOML path.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use TOML to YAML

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your TOML

    Paste it into the left box, press Paste, or open a .toml file. Sample loads a Traefik config. Hugo, Numbers and dates and Broken load other cases.

  2. 02

    Read the YAML and the notes

    The YAML appears on the right as you type. Converted dates, large integers and inf values are listed with their TOML path under Check these values. A TOML mistake is reported with its line and column and a hint.

  3. 03

    Choose how it is written

    Pick the indent, whether dates are quoted, whether text is always quoted, whether short lists sit on one line and whether long text wraps.

  4. 04

    Copy or download

    Press Copy to paste the YAML into your project, or Download to save it as config.yaml.

How to convert TOML to YAML

TOML and YAML both hold nested settings, lists, text, numbers and true or false. To convert toml to yaml, the tool reads your TOML with a strict parser, then writes the same data as indented YAML: each table heading becomes a key with its settings indented below it, and each array of tables becomes a list of maps.

The built-in sample is a Traefik static configuration. This part of it:

toml
[entryPoints.web]
address = ":80"

[providers.docker]
exposedByDefault = false

[certificatesResolvers.le.acme]
email = "admin@example.com"
storage = "/letsencrypt/acme.json"

[certificatesResolvers.le.acme.httpChallenge]
entryPoint = "web"

becomes:

yaml
entryPoints:
  web:
    address: :80
providers:
  docker:
    exposedByDefault: false
certificatesResolvers:
  le:
    acme:
      email: admin@example.com
      storage: /letsencrypt/acme.json
      httpChallenge:
        entryPoint: web

The full sample reports 17 keys, 10 tables and 17 lines. Text is only quoted when YAML needs it, so :80 stays bare because it does not start with a special character followed by a space.

TOML errors with line, column and a fix hint

Most TOML mistakes are small: a missing quote, a number with a leading zero, a table defined twice. The error message gives the line and column and says what to change. Take this input, which is the Broken sample:

toml
[server]
host = example.com
port = 8080

The result is: Invalid TOML at line 2, column 8: invalid value. The value after = is missing or not valid TOML. Text needs double quotes, and true, false and numbers must be spelled exactly. Write the host as "example.com" and the error is gone. Other messages cover a redefined table, a leading zero, an unfinished string and an array missing its closing bracket.

Dates, large integers and special numbers

TOML has real date and time types and YAML 1.2 does not, so these need care. Here is the Numbers and dates sample converted:

yaml
id: 9223372036854775807
ratio: 1.0
limit: .inf
launch: 2026-03-01
opens: 08:30:00
starts: 2026-03-01T08:30:00+02:00
answer: "yes"
version: "1.10"
  • Dates and times are written in ISO 8601 form, unquoted by default. YAML 1.1 readers such as PyYAML read them as timestamps and YAML 1.2 readers keep them as text. Switch Dates and times to Quoted text if you want a string everywhere.
  • Integers up to the 64-bit limit keep every digit. YAML itself is exact, but JavaScript readers round numbers above 9,007,199,254,740,991, so those are flagged by path.
  • A float such as 1.0 stays 1.0 and does not turn into the integer 1. inf and nan are written the YAML way, as .inf and .nan.
  • The words yes, no, on and off are quoted when they are text, so Ansible and PyYAML do not turn them into booleans. "1.10" is quoted too, so it is not read as the number 1.1.

Convert traefik.toml to traefik.yml

Traefik reads its static configuration from a TOML or a YAML file. If you want to convert traefik toml to yaml, paste the file and copy the result into traefik.yml. Dotted headings such as certificatesResolvers.le.acme become nested keys. Key names keep their exact case, which matters because Traefik option names are case-sensitive.

Check the result against the Traefik documentation for your version, because the tool converts the data and cannot know which options your version accepts.

Convert a Hugo config from TOML to YAML

Hugo accepts its site configuration in TOML, YAML or JSON. To convert hugo toml to yaml, paste your hugo.toml. Menus written as double-bracket menus.main blocks become a list under menus and main. The Hugo sample gives:

yaml
baseURL: https://example.org/
languageCode: en-us
title: Field Notes
publishDate: 2026-01-15T09:00:00Z
params:
  description: Notes on small tools
  comments: true
menus:
  main:
    - name: Home
      url: /
      weight: 1
    - name: Posts
      url: /posts/
      weight: 2

For front matter in a content file, paste only the lines between the +++ markers. The tool does not read the markers. Turn on Start with --- if you want the opening line, and add the closing --- yourself.

Options explained

  • Indent: 2 or 4 spaces per level.
  • Sort keys: puts the keys of every table in alphabetical order. Off keeps the order of your TOML.
  • Dates and times: unquoted ISO 8601, or quoted text.
  • Text quoting: only when needed, or double quotes on every text value and key.
  • Quote YAML 1.1 lookalikes: keeps yes, no, on, off, and text such as 12:30:45 or 0b101, as text for YAML 1.1 readers. It is unavailable when every text value is already quoted.
  • Multi-line text blocks: text with line breaks is written as a | block. Off writes one quoted line with \n.
  • Short lists: one item per line, or a list of up to six short values on one line, such as [80, 443].
  • Long text: wrap values longer than 80 characters over several lines, or never wrap.
  • Start with ---: adds the document start marker as the first line.

TOML to YAML in Python

Python 3.11 and later can read TOML with the built-in tomllib. PyYAML writes the YAML:

Python
import tomllib
import yaml

with open('config.toml', 'rb') as f:
    data = tomllib.load(f)
with open('config.yaml', 'w') as f:
    yaml.safe_dump(data, f, sort_keys=False)

To go back, use YAML to TOML. To see the data as JSON, TOML to JSON shows it, and JSON to TOML and YAML to JSON cover the other directions. Sort YAML Keys puts the finished YAML in alphabetical order.

Limits

  • Comments are not carried over. Add them to the YAML by hand afterwards.
  • TOML tables and arrays of tables become YAML maps and lists. The original table layout, such as dotted keys versus headings, is not kept.
  • Integers beyond the 64-bit range are rejected by TOML itself and reported as errors.
  • The tool checks that the YAML it writes is valid and holds the same data, not that your program accepts the values.
  • Fractional seconds in dates are kept to milliseconds.
  • Large files take longer to convert, and the preview may lag while you type.

Your TOML is converted in your browser. It is not uploaded or stored. See the Privacy Policy for details.

Frequently Asked Questions

Technical Q&A for TOML to YAML

Common questions about edge cases, character encoding, and privacy guarantees.

Paste your TOML into the left box. The YAML appears on the right at once. Press Copy or Download to use it.

They are written in ISO 8601 form such as 2026-03-01T08:30:00+02:00, unquoted by default. Choose Quoted text if you want every YAML reader to keep them as strings.

Yes, up to the 64-bit limit TOML allows, every digit is written. JavaScript readers round numbers above 9,007,199,254,740,991, so the tool flags those by path.

Yes, paste the file and copy the result. Nested headings such as certificatesResolvers.le.acme become nested keys with their exact case kept.

Paste your hugo.toml and save the output as hugo.yaml. Menus written as double-bracket menus.main blocks become a list. For front matter, paste only the lines between the +++ markers.

No. Comments are left out, and the Notes panel says so when your TOML had any. Add them to the YAML by hand.

YAML 1.1 readers such as PyYAML and Ansible turn unquoted yes, no, on and off into booleans. The tool quotes them when they are text. You can turn this off in the options.

TOML uses [tables] and key = value lines, has real date types and no null. YAML uses indentation, supports anchors, null and several documents per file.

No. The conversion runs in your browser and nothing is sent to a server.