Zero Signup ToolsFree browser tools

Converter Tools

YAML to TOML Converter

Convert YAML to TOML in your browser. Block, flow, anchors, multi-line strings, ISO dates, with section or inline tables and arrays of tables.

Output options

Tables

Sequences of maps

Indent

ISO date strings

YAML null

790 chars, 790 B

Parsing and conversion run entirely in your browser. The YAML pasted here never leaves your device.

How values map

  • YAML mappings become TOML [section] tables by default, or { inline } tables when you pick that style.
  • Sequences of mappings become [[arrays of tables]] in auto mode, or inline arrays when forced.
  • Strings that look like ISO-8601 date-times print as TOML date-time literals when the option is on. Hex and octal YAML integers convert to decimal TOML integers.
  • Integers stay as integers; non-integer numbers (and integers outside JavaScript's safe range) emit as floats. .inf, -.inf, and .nan become inf, -inf, and nan.
  • Keys with characters outside [A-Za-z0-9_-]are quoted as TOML basic strings. Anchors and aliases (&name, *name) resolve so the resulting TOML contains the expanded value.
  • YAML null and ~ have no TOML equivalent. The default policy drops the key and adds a comment; the strict policy errors out instead. Multi-document YAML wraps each document under a top-level documents array.

How to use

  1. Paste your YAML into the input on the left, or click Load sample to start with a Hugo-style example that exercises mappings, sequences, dates, multi-line strings, and arrays of objects.
  2. Choose the table style: Section tables for the standard [a.b] headers used in pyproject.toml, Cargo.toml, and Hugo configs, or Inline tables for { a = 1 } compact output.
  3. Pick the array style: [[arrays of tables]] turns YAML sequences of maps into TOML array-of-tables blocks; Inline arrays keeps them as inline JSON-like arrays of tables.
  4. Set the indent to 2 or 4 spaces, decide whether ISO date strings should emit as TOML date-times, and pick a null policy (skip with a comment, or error out).
  5. Read the stats above the TOML output (tables, keys, lines, byte size). Click Copy to take the result, or Download .toml to save it as a file.

About this tool

YAML to TOML Converter parses a YAML 1.2 document in your browser and emits a clean TOML v1.0 equivalent, ready to drop into pyproject.toml, Cargo.toml, fly.toml, netlify.toml, a Hugo or Zola site, or any other tool that prefers TOML. The parser implements the practical YAML subset used by real configuration files: block mappings (key: value) and sequences (- item) with significant indentation, flow mappings ({a: 1, b: 2}) and sequences ([1, 2, 3]) that can span multiple lines, plain scalars typed by the YAML 1.2 core schema (null, true/false, integers in decimal/hex/octal, floats, strings), single-quoted and double-quoted strings with full escape sequences, block scalars in literal (|) and folded (>) styles with strip and keep chomping indicators (|-, |+, >-, >+), comments, document separators (---), anchors (&name), and aliases (*name) that share structure. The TOML emitter follows TOML v1.0: nested mappings become [a.b] section tables by default, or { inline } tables when you prefer compact output; sequences of objects become [[arrays of tables]] in auto mode, or stay inline when forced; integers stay as integers; non-integer numbers (and very large integers) emit as floats; .inf, -.inf, and .nan become inf, -inf, and nan; ISO 8601 strings emit as native TOML date-time literals (toggleable); keys with characters outside [A-Za-z0-9_-] are quoted as basic strings; multi-line strings emit as TOML multi-line basic strings so newlines round-trip cleanly. YAML nulls have no TOML equivalent: the default policy drops null keys and adds a comment, while the strict policy fails the conversion. Multi-document YAML wraps each document under a top-level documents array so nothing is lost. Useful for porting Kubernetes, GitHub Actions, GitLab CI, Docker Compose, Ansible, Helm, or OpenAPI YAML into TOML configs, migrating Hugo or Zola sites from YAML to TOML front matter and site configs, dropping a YAML snippet into a Cargo.toml or pyproject.toml, or any moment you have YAML in hand and a TOML-only target. Everything runs locally on your device, so configs, secrets, and project files you paste here never leave your browser.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools