tomlkit.org
TOML utilities, in the browser
Say hi →

TOML to YAML Converter

Paste TOML on the left, get YAML 1.2 on the right. Entirely in-browser — no upload, no server round-trip.

TOML to YAML Converter

updated 25 April 2026

Drop a .toml file here, or

Before you start

You need a valid TOML document. This can be a .toml file from your local machine or raw text you've copied from a configuration file. I built this tool specifically to handle TOML 1.0, so features like dotted keys, heterogenous arrays, and various date formats should all parse without issues.

Keep in mind that while YAML is a superset of JSON, it has a very different relationship with TOML. Both are designed for humans, but they organize data differently. This tool is perfect for when you're migrating a local development config (like a Cargo.toml or pyproject.toml) into a tool that expects YAML, such as a GitHub Actions workflow or a Kubernetes manifest.

There are no server-side uploads happening here. The conversion is performed entirely by your browser using JavaScript. This means your sensitive API keys or database credentials never leave your computer, which is exactly how a tool like this should work.

How to use it

  1. Paste your TOML content into the left-hand input pane, or drag and drop a .toml file directly onto the area.
  2. Click the Run button to trigger the conversion.
  3. Review the generated YAML in the right-hand pane — the tool will maintain your data hierarchy, converting tables to mappings and arrays of tables to sequences.
  4. Click Copy result to grab the YAML for your clipboard.
  5. Use the Clear button if you need to start fresh with a new document.

Example

Input (TOML):

[database]
server = "192.168.1.1"
ports = [ 8000, 8001, 8002 ]
enabled = true

[[users]]
name = "Alice"
role = "admin"

[[users]]
name = "Bob"
role = "user"

Output (YAML):

database:
  server: 192.168.1.1
  ports:
    - 8000
    - 8001
    - 8002
  enabled: true
users:
  - name: Alice
    role: admin
  - name: Bob
    role: user

Tips & common pitfalls

Troubleshooting

I click "Run" but nothing happens or I get an error.

This usually means your TOML is invalid. Check for unclosed quotes, mismatched brackets in arrays of tables ([[...]]), or duplicate keys. The status bar at the bottom will often give you a hint about where the parser got stuck.

The YAML indentation looks wrong.

The emitter uses a standard two-space indentation. If your specific environment (like some strict CLI tools) requires four spaces, you might need to run the output through a dedicated formatter after copying it from here.

My multi-line strings look different in YAML.

TOML and YAML handle multi-line text using different syntax (triple-quotes vs. pipe characters). The converter chooses the most efficient YAML representation, but the actual string content remains identical.

Related tools

See also: if you need to do something adjacent on this site, try YAML to TOML to convert YAML to TOML, JSON to TOML to convert JSON to TOML, or TOML to JSON to convert TOML to JSON.

Frequently asked questions

Why would I convert TOML to YAML?

It's usually a matter of ecosystem compatibility. You might be moving from a language that loves TOML (like Rust or Go) to a platform that runs on YAML (like Kubernetes, Docker Compose, or Home Assistant). It's also a great way to "normalize" a config file if you find TOML's [[header]] syntax confusing for large datasets.

How are TOML datetimes represented in YAML?

They are serialized as ISO 8601 strings. Since YAML 1.2 doesn't have a mandatory "date" type in the same way TOML does, strings are the safest way to ensure no data is lost during the jump between formats.

Does my data get sent to a server?

Nope. I built this using smol-toml and js-yaml, both of which run entirely in your browser's JavaScript engine. Your data stays in your memory and never touches my logs or any third-party API.

Can I convert really large files?

Generally, yes. Since it runs client-side, the limit is your browser's available memory. Most configuration files are small enough that the conversion is instantaneous. If you're trying to convert a 50 MB TOML file, your tab might hang for a second while the YAML string is built.

Is there a CLI version of this?

I don't offer one, but you can achieve this on the command line using yq. Running yq -P -oy eval config.toml will give you a very similar result to what you see here.