YAML to TOML Converter
Turn YAML configuration into TOML. Mappings become [tables], lists become arrays, and values keep their types. Problems in the YAML, such as wrong indentation, are reported with the line number.
How to Convert YAML to TOML
Quick answer: paste your YAML or open the file; the TOML appears below. Copy it or download the .toml file.
-
1
Add your YAML
Paste it or open a file.
-
2
Choose options
Adjust the output on the right.
-
3
Check the TOML
Errors are explained clearly.
-
4
Copy or download
Save it as .toml.
What You Get
What Is YAML?
YAML is a readable data format that uses indentation instead of brackets. Lists start with dashes, keys and values are separated by a colon, and comments start with #. It is widely used for configuration, automation and deployment files and for document front matter.
What Is TOML?
TOML is a configuration format designed to be easy to read. Settings are written as key = value lines, grouped under [table] headings, with clear types for text, numbers, true/false, dates and lists. Many build tools, package managers and applications use TOML for their settings files.
Why Convert YAML to TOML?
Moving a project between tools sometimes means moving its settings from YAML to TOML. Converting automatically avoids rewriting nested settings by hand and keeps every value exactly as it was.
How the Conversion Works
Top-level keys with simple values become key = value lines, nested mappings become [table] sections, lists of mappings become [[arrays of tables]], and dates are written in standard form. Comments are not carried over, and null values are left out because TOML has no null.
Example
The sample YAML becomes the same TOML as the JSON example: title, debug and port, then [owner] and [database] tables.
Who Uses It?
Developers switching tools, maintainers standardising configuration and anyone tidying settings files. Because everything happens in the browser, it is also safe for internal and confidential files.
Using Your TOML File
Save the result with the .toml extension and place it where your tool expects its settings file. Check that dates and numbers came out as you intended, and add comments with # to explain important settings for whoever edits the file next.
Common Problems in YAML Input
YAML depends on indentation, so the most common problem is a line indented with a tab or with a different number of spaces than its neighbours. Other surprises: a colon followed by a space inside an unquoted value, values like yes, no or on that some tools read as true or false, and numbers with leading zeros. Wrap such values in quotes if they must stay text. The error message shows the line to check.
Checking Your TOML Output
Check that settings landed in the right [table] and that lists of objects appear as [[double bracket]] headings, which is how TOML writes repeated groups. Text is always quoted, while numbers, true/false and dates are not. Because TOML cannot store empty values, any null in the input is left out; the status line tells you when this happened so you can add a sensible default.
Step by Step
Start by pasting your YAML into the input box, or press Open File to load it from your device. The converter reads it straight away and shows the TOML in the output box. If the input has a problem, a short message explains what is wrong and where, so you can fix it in place. Next, adjust the options on the right; the output refreshes immediately so you can compare. When you are happy, press Copy to put the result on your clipboard, or Download to save it as a .toml file ready to use.
Private, Free and Instant
The converter is free, with no sign-up, no limit beyond the 5 MB file size and no watermark. It runs in your browser, so settings files with passwords, server addresses or customer data are never uploaded or stored. Paste the content, drop a file on the input box or press Open File, then copy the result or download it with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.
YAML to TOML: Typed Configuration Files
TOML is designed to be obvious: sections in brackets, typed values and no indentation rules.
Mapping and limits
Maps become tables, lists of maps become arrays of tables. TOML cannot express null values or arbitrary nesting as easily, so some structures need to be reworked. See TOML to YAML for the reverse.
Frequently Asked Questions
Questions about YAML to TOML