TOML to YAML

Turn a TOML config into indented YAML.

Reverse
Input
TOML input
Output
Result
Options

Spaces per level of nesting.

About this tool


This conversion goes from the more explicit format to the more expressive one, so nothing structural is lost. TOML tables become indented YAML mappings, and arrays of tables become YAML sequences of mappings.

It is the direction you want when a tool expects YAML, most CI systems and Kubernetes tooling, but your configuration is authored in TOML.

How to use it

  1. Paste or upload TOMLDrop a .toml file or paste the config.
  2. ConvertPress Convert to YAML, or use Ctrl+Enter.
  3. Copy or downloadSave as .yaml or copy the output.

Worked examples


Each example below is executed against this tool by the test suite, so what you see is what the tool actually produces.

Table and array of tables

Input

title = "My App"

[owner]
name = "Ada"

[[servers]]
host = "alpha"

Output

title: My App
owner:
  name: Ada
servers:
  - host: alpha

The [owner] table becomes indented, and [[servers]] becomes a sequence entry.

What to watch for


The details that decide whether a conversion is correct, and where information can be lost without any error being raised.

Table headers become indentation
A [server.tls] header becomes a tls mapping nested under server. The output is deeper-looking than the TOML but expresses the same tree, and each [[array]] block becomes a hyphenated YAML sequence entry.
Dates become ISO 8601 strings
TOML datetimes are converted to ISO 8601 text. YAML can parse a timestamp back into a date, so most YAML consumers will treat the value as a date again, but the round trip through text means a zone-less local time is rendered in UTC.
Comments are still lost
Both formats support comments, but the conversion runs through a parsed data structure that does not retain them. Nothing else is dropped: every TOML value has a YAML equivalent.
Strings gain YAML's quoting rules
TOML always quotes strings; YAML quotes only when needed. So a value like "true" keeps its quotes in the output, without them YAML would read it as a boolean, while ordinary words lose them for readability.

Limitations


  • Comments are not preserved.
  • Zone-less TOML local times are rendered in UTC as ISO 8601 text.
  • Processing happens in your browser, so very large inputs are bounded by available memory. Files above roughly 10 MB are handled but will feel slower, and multi-hundred-megabyte files are better suited to a command-line tool.

Questions


Is anything lost converting TOML to YAML?
Only comments. YAML can express everything TOML can, so all values and structure carry across.
Why are some strings still quoted?
YAML would otherwise reinterpret them. A value like "true" or "01234" needs quotes to stay a string rather than becoming a boolean or a trimmed number.