100% local — your data never leaves your browser

TOML to YAML — Config Both Readers Agree On

Convert a TOML config to YAML. Ambiguous scalars come out quoted, so an old PyYAML reader and a modern one give your app the same values.

Instant Private Zero cookies
Indentation

TOML input

YAML output

What this tool does

A TOML config becomes YAML. Tables become nested mappings, and [[arrays of tables]] become sequences.

title = "Demo"

[server]
host = "localhost"
port = 8080
title: Demo
server:
  host: localhost
  port: 8080

Indentation is an option; two spaces is the default and what most YAML linters expect.

Quoted where it matters, bare everywhere else

country = "NO"
answer = "yes"
start = "12:30"
country: "NO"
answer: "yes"
start: "12:30"

Left bare, those three would be read as false, true and the number 750 by any YAML 1.1 reader — PyYAML, and therefore Ansible, and therefore a great many pipelines. It is the Norwegian problem: a country code that turns into a boolean, with nothing in the file to warn you. The writer quotes exactly the scalars that are ambiguous and leaves the rest alone, so the file stays readable and both YAML versions agree on what is in it.

Large integers keep their digits

snowflake = 1096285471735640155
snowflake: 1096285471735640155

TOML mandates signed 64-bit integers, and the parser used to refuse the whole document when one went beyond what a JavaScript number holds exactly. A single identifier made a legal config unconvertible. The digits now cross unchanged — a real defect, found while writing this page and fixed.

What the JSON pivot costs

This conversion goes through JSON, as every composed conversion on this site does: the two halves are already tested, and their error messages are already precise.

  • inf, -inf and nan are refused, with the key named. JSON has none of the three and would write them as null, so an infinite rate would arrive as an absent one. YAML could hold .inf; the pivot cannot, and it says so rather than dropping the value.
  • Dates become quoted strings. A TOML date has no JSON counterpart. Going direct would keep it a date, but a local time such as 07:32:00 would gain a whole invented calendar date around it.
  • Comments do not survive. They belong to the file, not to the data.

A file starting with the invisible byte order mark a Windows editor adds is now read normally, instead of being refused with a message about the characters allowed in a key.

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 my value quoted when nothing else is?
Because it would mean something else to half the world’s YAML readers. The `yaml` package writes YAML 1.2, where `NO`, `yes` and `12:30` are strings. PyYAML — the most widely used YAML reader there is — applies YAML 1.1, where they are false, true and the sexagesimal number 750. Quoting exactly those scalars, and nothing else, gives both readers the same values from the same file.
What happened to my dates?
They arrive as quoted strings, such as `"1979-05-27"`. The conversion goes through JSON, which has no date type, so a TOML date becomes text — and text that looks like a date has to be quoted, or a YAML 1.1 reader would turn it back into a timestamp of its own choosing.
Why is `inf` refused when YAML can write `.inf`?
Because JSON sits in the middle. Every composed conversion on this site pivots through JSON, which has no infinity, so the value is refused with its key named rather than silently nulled. Going straight from TOML to YAML would save the infinity, but it would turn a local time like `07:32:00` into a full timestamp with a date invented around it. The pivot loses less, and what it cannot carry, it names.

Related converters