Loading YAML to TOML Converter...

Convert YAML to TOML - Complete Guide

Step 1

Input Your YAML Configuration

Get started by inputting your YAML configuration. This converter works great for Kubernetes configs, Docker Compose files, CI/CD pipelines, and more.

Step 2

Automatic Conversion

The converter automatically transforms your YAML to valid TOML format, handling nested structures, arrays, and complex data types correctly.

Step 3

Download or Copy Result

Once converted, you can copy the TOML to your clipboard or download it as a .toml file ready for use in your Rust, Python, or other projects.

FAQs About YAML to TOML Conversion

Why convert YAML to TOML?

TOML is the config format of Rust (Cargo.toml), Python packaging (pyproject.toml) and Hugo, among others. It has no significant indentation, so a stray space can't move a key into the wrong section. Converting is handy when a project switches tools and the old settings live in a YAML file.

What YAML features are supported?

Nested maps become [tables], lists of maps become [[arrays of tables]] with their full parent path, and other lists become inline arrays. Strings, numbers and booleans keep their type. Anchors and aliases are expanded to their full values, and several documents separated by --- are written as a list under a "documents" key, because a TOML file holds only one document.

What happens to null values and dates?

TOML has no null, so empty or null values are left out, and a note under the output names which ones. Dates like 2024-01-15 are written as quoted strings exactly as they appear in the YAML, since the YAML 1.2 reader used here treats them as text. Remove the quotes by hand if you want a native TOML date.

Will my numbers change?

No. Each number is copied from the text you typed, so 8901240544102066246 keeps every digit and 14.50 keeps its trailing zero. A value with leading zeros such as 00501 becomes a string so the zeros survive, and a whole number past the 64-bit limit TOML allows is written as a string with its digits intact. Both cases are pointed out in a note.

Is my YAML sent anywhere?

No. The conversion runs in your browser, and nothing you paste or upload is sent to a server. Uploads are limited to 10 MB.

Can I convert back to YAML?

Yes. The TOML to YAML converter does the reverse, and the TOML Validator and TOML Formatter are there if you want to check or tidy the result first.

Related: TOML to YAML, TOML Validator, TOML Formatter and JSON to TOML.