Skip to content

YAML to TOML converter

Paste one YAML document. Comments are dropped, and null is an error.

Comments in the YAML are discarded. TOML has no null, and timestamps stay strings under the YAML 1.2 core schema.

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

YAML input
TOML output

Waiting for input.

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

How to use this tool

  1. Paste one YAML document, or load the sample.
  2. If the status reports a comment, the comment is not in the TOML.
  3. Copy or download only when the conversion succeeds. A failed parse leaves the output empty.

Supported formats and limitations

  • One YAML document only. A stream separated by --- is rejected.
  • Parsing uses the YAML 1.2 core schema. yes, no, on, and off stay strings. true and false are booleans.
  • Timestamps stay strings. The core schema does not turn them into TOML datetimes.
  • Null is rejected. Non-finite numbers and integers outside ±(2^53 − 1) are rejected.
  • Duplicate keys are errors. Merge keys written as << are not expanded.
  • Comments are discarded. Arrays must contain one kind of value.

Examples

A nested map

A nested YAML mapping becomes a TOML table.

database:
  host: localhost
  port: 5432

A string that looks like a timestamp

Under the core schema, 2024-01-15 is a string, not a TOML date.

shipped: 2024-01-15

Common errors and solutions

TOML has no null
Remove the null key or give it a string, number, or boolean.
More than one YAML document
Delete the extra --- documents and convert one table at a time.
Duplicate key
Keep one spelling of the key. The converter does not choose a winner.

FAQ

Why did my comments disappear?
The TOML is generated from the parsed values. Comments have nowhere to go, and the page says so when it sees them.
Will a YAML timestamp become a TOML datetime?
No. The YAML 1.2 core schema reads it as a string, and the TOML output keeps that string.
Is the YAML uploaded?
No. Parsing and conversion happen in your browser.

Related tools

  • TOML to YAML converter

    Convert TOML 1.1 configuration to YAML with 2-space or 4-space indentation. Dates become strings, comments are dropped, and invalid TOML produces no YAML.

  • YAML to JSON converter

    Convert YAML configuration to readable or compact JSON in the browser. Comments are dropped, and parse errors include line and column when the parser reports them.

  • JSON to TOML converter

    Convert a JSON object to TOML in the browser. Null values and mixed arrays are rejected, and invalid JSON produces no TOML.