Skip to content

TOML to YAML converter

Paste TOML. Dates become strings and comments are dropped.

TOML datetimes become YAML strings. Offset datetimes keep their offset, local dates stay calendar dates, and local times stay clock times. Comments are not kept.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

YAML indent
TOML input
YAML output

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste TOML, or load the sample, which includes a date and a table.
  2. Choose 2-space or 4-space YAML indentation.
  3. Read the notices. Copy or download only when the conversion succeeds.

Supported formats and limitations

  • Supported syntax is TOML 1.1 as implemented by smol-toml.
  • Offset datetimes, local datetimes, local dates, and local times become YAML strings.
  • inf and nan are rejected. Integers outside ±(2^53 − 1) are rejected.
  • Comments are discarded. A hash inside a quoted string is data and is kept.
  • Keys named __proto__ or constructor are rejected.

Examples

A local date

A date without a time becomes a calendar-date string, not a UTC timestamp.

shipped = 2024-05-01

An array of tables

Repeated [[products]] tables become a YAML list of mappings.

[[products]]
name = "Widget"

[[products]]
name = "Gadget"

Common errors and solutions

Invalid TOML document
Check the quoted line and column. A missing value after = is a common cause.
Non-finite number
Replace inf or nan with a finite number or a quoted string.
Integer outside the safe range
Quote the integer if you need every digit. The tool will not round it.

FAQ

Why is the date a string?
The YAML is generated from the parsed value. The original TOML date type is written as text so the digits and offset stay visible.
Are comments kept?
No. The YAML is rebuilt from values. A comment notice is shown when the TOML contains one.
Are TOML files uploaded?
No. Parsing and conversion happen in your browser.

Read next

Related tools

  • YAML to TOML converter

    Convert one YAML document to TOML in the browser. Comments are dropped, null is rejected, and multi-document streams are not merged.

  • TOML to JSON converter

    Convert TOML 1.1 configuration to JSON in the browser, including tables, arrays, strings, booleans, dates, and numbers, with explicit notes where the types differ.

  • JSON to YAML converter

    Convert valid JSON into YAML with 2-space or 4-space indentation. Nested objects, arrays, and multiline strings are preserved, and invalid JSON is reported instead of repaired.