⚡
usefultools.dev
Y→T

YAML to TOML Converter

NEW

Convert YAML to TOML in your browser: paste or upload a file, pick how nulls are handled, then copy or download.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

Options

TOML limits: the top level must be a table (a YAML mapping), TOML has no null, and only one document can be written — a file with several --- documents is rejected with a message. YAML dates and timestamps become TOML dates; anchors and aliases are expanded.

⚡

Quick Examples

Typical inputs and the results this tool produces.

Key
title: Demo
title = "Demo"
List
ports: [8001, 8002]
ports = [ 8001, 8002 ]
Table
owner: name: Ada active: true
[owner] name = "Ada" active = true
Date
born: 1979-05-27
born = 1979-05-27
📖

Overview

YAML to TOML Converter rewrites a YAML document as TOML, the key-value format used by Cargo.toml, pyproject.toml and many other config files. Nested mappings become [tables], lists of mappings become [[array tables]], and YAML dates stay real TOML dates.

TOML is stricter than YAML, so the tool explains what cannot be carried over. The top level must be a mapping, null has no TOML equivalent and a file with several --- documents cannot be merged. Each case gets a plain message, with the line number for syntax errors in your YAML.

Everything runs in your browser, so config files with internal hostnames or tokens are not uploaded.

Why use this tool?

  • Moves a config between YAML and TOML without retyping brackets and quotes
  • Reports TOML limits (null, top-level lists, multiple documents) in plain words
  • YAML syntax errors show the line, column and the offending text
  • Nothing is uploaded — the conversion happens in your browser
⭐

Features

📄

Paste or upload

Type YAML into the box or open a .yaml / .yml file up to 2 MB.

🗓️

Real dates

YAML dates and timestamps are written as native TOML dates, not strings.

🚫

Null handling

Choose between a clear error with the key path, or leaving null keys out.

📍

Error locations

Invalid YAML is reported with its line, column and the line itself.

⇄

Swap direction

Send the TOML straight to the TOML → YAML tool to check the round trip.

⬇️

Copy or download

Copy the result or save it as a .toml file named after your input file.

🛠️

How to Use

1

Add your YAML

Paste it, open a file with Upload file, or press Load sample.

2

Choose null handling

Keep the default to get an error on null, or switch to omit those keys.

3

Read the notices

Fix any red error; amber notes list what was dropped or may be unsupported.

4

Copy or download

Use Copy or Download .toml, or Swap to convert back the other way.

🤔

Frequently Asked Questions