Skip to content

Developers

YAML TOML Converter

YAML TOML Converter

Beta

Convert YAML to TOML 1.0 and TOML back to YAML in your browser. Mappings become tables, lists of mappings become arrays of tables, and nulls are handled explicitly.

Use via API
  • Free, no sign-up
  • REST + MCP
  • Updated
  • Reviewed by Olgun Ozoktas

The config is converted in your browser and is not uploaded to FindUtils. Analytics and ads may load on the page.

YAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
TOML

Tables will appear here..

How to convert YAML to TOML

  1. Paste or upload the YAML

    Paste the document into the left panel or upload a .yaml or .yml file. The samples are a small app config, a list of services, and a site config.
  2. Check the root

    The YAML root has to be a mapping, because TOML has no top-level list. A document that starts with a sequence is refused with that explanation rather than wrapped in an invented key.
  3. Choose what happens to nulls

    TOML has no null. Drop leaves the key out and lists it, which is usually right. Empty string writes an empty value instead. Either way the affected paths are named under the panels.
  4. Copy or download

    Copy the TOML or download config.toml. Switch the direction to read a TOML file as YAML; the current output moves into the input for a round-trip check.

Common Use Cases

Moving a config into Cargo or pyproject

A settings file kept in YAML becomes the tables a Rust or Python project expects, without hand-writing [section] and [[array]] headers.

Hugo and Zola site configs

Static site generators accept both formats and their documentation is usually written in one. Convert the example into the format your repository already uses.

Reading a TOML file as YAML

Deeply nested tables are easier to scan as indentation. Convert it, read it, and keep working with the original file.

Checking a structure quickly

Round-tripping a document shows what the data actually is, separate from the formatting and the comments around it.

Why convert YAML to TOML in the browser?

FindUtils already converts JSON to YAML and JSON to TOML, which means the third side of the triangle was a two-page detour: paste YAML, take the JSON, open another page, paste it again. This tool closes it. The job is real work for anyone moving a settings file into a Rust Cargo.toml, a Python pyproject.toml, or a Hugo or Zola config.toml, and for anyone reading a TOML file who would rather see it as indented YAML. Writing tables and arrays of tables by hand is slow and easy to get subtly wrong, and a config often holds a connection string that should not be pasted into an upload form.

YAML and TOML solve the same problem with opposite instincts. YAML nests by indentation and will happily hold anything; TOML is flat, explicit and typed, with tables named in square brackets. FindUtils' YAML TOML Converter reads one and writes the other in the browser, so a settings file can move between a Compose-style YAML world and a Cargo or pyproject world without a CLI and without a detour through JSON on two separate pages.

Mappings become tables, lists of mappings become arrays of tables, and lists of scalars stay inline arrays. The YAML root has to be a mapping because TOML has no top-level list, and a document that breaks that rule is refused with the reason rather than wrapped in a key you did not ask for. Anchors, aliases and merge keys are resolved on load, which means a block built with <<: *defaults is written out in full, because TOML cannot reference another table.

The one thing TOML genuinely cannot express is null, so the choice is yours and it is visible: Drop leaves the key out, Empty string writes an empty value, and either way the affected paths are listed under the panels instead of disappearing. Comments do not survive in either direction. For the other two sides of the triangle, use the JSON YAML Converter and the JSON TOML Converter, and the YAML Validator to check a document first.

How it compares

The usual answers are a CLI such as yj or remarshal, which is a reasonable install for a daily habit and overkill for a one-off, or chaining two web converters through JSON, which loses dates and needs two pastes. This page does it in one step and names what changed: the null keys it dropped, the root it refused, and the line and column of a parse error.

It is honest about its limits. Comments are gone, multi-document YAML is not merged, and a value TOML has no type for is refused rather than approximated. Where a tool has to guess, this one asks or stops.

YAML and TOML Tips

  • TOML has no null. Decide between Drop and Empty string deliberately, because a dropped key and an empty string mean different things to the program that reads the file.
  • A list of mappings becomes an array of tables written as [[name]]. A list of scalars stays an inline array on one line.
  • Anchors, aliases and << merge keys are resolved before the conversion, so a merged block is written out in full. TOML has no way to reference another table.
  • Comments are not preserved in either direction. Keep the original file if its comments matter; this page converts data, not documentation.
  • A YAML date such as 2026-01-01 is a real date, and TOML keeps it as a date rather than quoting it. Quote the value in the YAML if you meant it as text.

Frequently Asked Questions

Why must the YAML root be a mapping?

Because a TOML document is a table at the top level and has no syntax for a bare list. A YAML file that starts with a sequence is refused with that explanation, so you can decide what key the list should live under rather than have one invented for you.

What happens to null values?

TOML has no null, so you choose. Drop, the default, leaves the key out entirely. Empty string writes an empty value. Both list every affected path under the panels, because a silently missing key is the kind of change that surfaces much later.

How is a list of objects converted?

It becomes an array of tables, written as repeated [[name]] blocks, which is TOML's own idiom for that shape. A list of plain scalars stays an inline array on a single line.

Are comments preserved?

No, in either direction. Both parsers read data and the writers emit data. If the comments in a config carry meaning, keep the original file and use the converted one as a starting point.

What happens to anchors, aliases and merge keys?

They are resolved when the YAML is read, so the output holds the real values. A block assembled with << and an alias is written out in full, because TOML has no way to point at another table. The YAML file keeps its anchors; only the conversion expands them.

Does it handle multi-document YAML?

It converts the first document. TOML has no concept of several documents in one file, and merging them would require rules this page does not invent. Split the file first if you need each document separately.

Are dates and times converted correctly?

Yes. A YAML date or timestamp becomes a TOML date or datetime rather than a quoted string, and a TOML datetime comes back as a YAML timestamp. Quote the value in the source if you meant it as text.

Is my config uploaded?

No. Both parsers run in your browser and no request carries the document. Third-party analytics and ads may load on the page, as on the rest of the site.

Why did my TOML fail to parse?

The error names the line and column. The usual causes are a value with no right-hand side, a bare string that needed quotes, or a table header repeated in a file that already defined it.

Can I use this instead of the JSON converters?

Use it when both ends are YAML and TOML. When JSON is one end, the JSON YAML Converter and JSON TOML Converter are the direct route; this page exists so YAML to TOML no longer needs both of them in sequence.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool