Skip to content
DevToolKit

TOML to YAML Converter

Convert TOML configuration files to YAML with configurable indentation, key sorting, and block or flow style output. Runs entirely in your browser.

TOML → YAML

Configuration Converter

Configuration

Conversion happens as you type. TOML date-time values are automatically converted to ISO 8601 strings in the YAML output.

Was this tool helpful?

How to Use

This free online TOML to YAML converter transforms TOML configuration files into clean, readable YAML instantly. It supports the full TOML 1.0 specification and runs entirely in your browser with zero server uploads.

  1. Paste your TOML: Enter or paste your TOML configuration into the left input panel. You can also click "Load Sample" to see a Cargo.toml-style example.
  2. Configure output: Adjust indentation (2 or 4 spaces), toggle alphabetical key sorting, and choose between block style (readable) or flow style (compact).
  3. Copy the result: The YAML output appears instantly in the right panel. Use the copy button to grab the converted YAML.

About This Tool

TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read due to its clear semantics. It is widely used in Rust (Cargo.toml), Python (pyproject.toml), and Hugo static site generators. TOML maps unambiguously to a hash table, making it predictable for both humans and machines.

YAML (YAML Ain't Markup Language) is a data serialization language commonly used for configuration files in Kubernetes, Docker Compose, Ansible, GitHub Actions, and CI/CD pipelines. YAML uses indentation-based nesting and supports complex data types including anchors, aliases, and multi-line strings.

This converter uses the smol-toml parser (fully TOML 1.0 compliant) and the js-yaml serializer. TOML date-time values—offset datetime, local datetime, local date, and local time—are automatically converted to ISO 8601 string representations in the YAML output.

Why Use This Tool

When to Convert TOML to YAML

Migrating a Rust project's configuration to a YAML-based CI/CD system like GitHub Actions or GitLab CI often requires translating Cargo.toml metadata into YAML. Similarly, converting Hugo's config.toml to a YAML equivalent lets teams standardize on a single configuration format across their infrastructure stack.

100% Client-Side Privacy

Configuration files frequently contain database credentials, API keys, and internal hostnames. This tool processes everything locally in your browser—no data is transmitted to any server. The conversion uses the browser's JavaScript engine directly, so it works offline and handles files of any size without upload limits.

FAQ

What TOML features does this converter support?
This converter supports the full TOML 1.0 specification including inline tables, arrays of tables, multi-line strings, literal strings, integer formats (hex, octal, binary), float special values (inf, nan), and all date-time types (offset, local, date-only, time-only).
How are TOML date-time values handled in the YAML output?
TOML date-time values (offset date-time, local date-time, local date, local time) are converted to ISO 8601 string representations in the YAML output. For example, a TOML value of 2024-03-15T10:30:00Z becomes the YAML string '2024-03-15T10:30:00.000Z'.
What is the difference between block style and flow style YAML?
Block style uses indentation to show structure, with each key on its own line. Flow style uses curly braces and square brackets inline, similar to JSON. Block style (the default) is more readable for configuration files, while flow style produces more compact output.
Is my data sent to a server for conversion?
No. All parsing and conversion runs entirely in your browser using the smol-toml parser and js-yaml serializer. Your configuration data never leaves your device, making it safe for proprietary or sensitive configuration files.