100% local — your data never leaves your browser

YAML to TOML — Config Files, Converted

Convert a YAML config to TOML. Nested mappings become tables, ready for Cargo, pyproject or anything else that reads TOML.

Instant Private Zero cookies

YAML input

TOML output

What this tool does

Nested mappings become tables, lists of mappings become arrays of tables:

db:
  host: db.example.com
  pool:
    size: 10
servers:
  - name: a
  - name: b
[db]
host = "db.example.com"

[db.pool]
size = 10

[[servers]]
name = "a"

[[servers]]
name = "b"

Three things TOML cannot hold

Null. TOML has no null value. Dropping the key would change what the file says; writing "" would invent a value. The conversion stops and tells you which key.

A top-level list. A TOML file is a table — the top level is key/value pairs, always. A YAML document whose root is a sequence has nowhere to put them. Name the list and it converts.

Several documents. --- separates YAML documents; TOML has no separator, and no way to say “and here is another file”. One at a time.

Dates stay strings

2026-01-01 arrives as a string, because that is how YAML 1.2 reads it, and it leaves as a quoted string.

TOML does have a native date type, and using it would mean deciding that the author meant a date. Sometimes they did. Sometimes 2026-01-01 is a product reference, a folder name, a version. Guessing wrong turns text into a timestamp, and that is not a change you would notice until something downstream sorts it.

One thing to know about long integers

An integer beyond about fifteen digits is rounded on the way through. The conversion passes via JSON, whose numbers are double-precision floats, and that is where the digits are lost.

yaml-to-json itself keeps them exact — it reads the digits as written. The boundary that rounds is the one shared with every json-to-… conversion, and it will be fixed there rather than papered over here. Until then: if your file carries a twenty-digit identifier, quote it in the YAML and it will cross as a string, intact.

Private by design

Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.

Frequently asked questions

Why is null refused instead of being left out?
Because TOML has no null, and the two ways of faking it are both wrong. Dropping the key changes what the file says — an absent setting is not a setting set to nothing. Writing an empty string invents a value. The conversion stops and names the key, so you decide.
Why can’t my top-level list be converted?
Because a TOML file is a table: the top level is always key/value pairs. A YAML document whose root is a sequence has nothing to hang those keys on. Give the list a name — `items:` in front of it — and it becomes an array of tables.
Why did my date come out as a quoted string?
Because that is what it was when it arrived. YAML 1.2 reads `2026-01-01` as a string, so writing it as a TOML date would mean guessing that the author meant a date, and getting that wrong turns a product reference like `2026-01-01` into a timestamp. A quoted string keeps exactly what the file held.

Related converters