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,-infandnanare refused, with the key named. JSON has none of the three and would write them asnull, 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:00would 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.