AnkhKit

YAML to TOML Converter Online — Free

Runs 100% in your browser — your files never leave your device.

Moving a config from a YAML world into a TOML one — Cargo.toml, pyproject.toml, Hugo sites — usually means rewriting by hand. Paste your YAML and get equivalent TOML out, routed through JSON so every nested table and array survives. Errors in the source YAML are flagged inline.

How it works

  1. 1

    Paste your YAML

    The TOML output follows as you type.

  2. 2

    Review tables and arrays

    Nested structures become TOML tables automatically.

  3. 3

    Copy the TOML

    One click copies the converted configuration.

About this tool

How the conversion works

The tool parses your YAML and re-renders it as TOML — tables for objects, key-value pairs for scalars, arrays in TOML syntax. The data crosses formats exactly; only the syntax style changes from indentation-driven to table-driven.

TOML for configuration

TOML is the config format of Rust (Cargo), Python (pyproject.toml), and many modern tools — explicit, diff-friendly, and immune to YAML's whitespace traps. Converting YAML infrastructure values into TOML lands them in a format with fewer surprises.

Nesting maps differently

YAML nests by indentation; TOML nests by table headers. Deep YAML structures convert into [table.subtable] headers, which read differently but carry the same hierarchy — spot-check the deep sections after conversion.

Frequently asked questions

What happens to deeply nested YAML?

Each nesting level becomes a TOML table header path. Very deep trees produce long header paths — the data is intact, but the presentation favors breadth over depth.

Why choose TOML over YAML?

TOML is explicit — no indentation grammar, no type-inference surprises, no Norway problem. For hand-edited config, it trades YAML's terseness for predictability.

Is the conversion lossless?

For standard YAML data — objects, arrays, strings, numbers, booleans — yes. YAML's exotic features (anchors, tags) fall outside the conversion.

More data converters