DevMate
Back to Toolverse

Converters

YAML ↔ TOML Converter

Map YAML settings to TOML tables and TOML back to YAML. Work through nested settings, unsupported null values, and changes to comments and formatting.

Local processing
Loading tool workspace...

About this tool

When to use it

Map YAML settings to TOML tables and TOML back to YAML. Work through nested settings, unsupported null values, and changes to comments and formatting.

How to use it

Use this pair when migrating named configuration settings between a YAML file and an application that reads TOML. Start with a root mapping, choose the direction, and paste the source. Convert and compare the resulting table names and values with the target application documentation. Switching direction loads a fresh example; copy any result you want to reuse first.

Guide updated . Examples checked against this implementation.

Worked examples

YAML to TOML: a service table

Input

service:
  port: 3010

Expected output

[service]
port = 3_010

The nested mapping becomes a TOML table. The underscore is a TOML digit separator; the numeric value is still 3010.

TOML to YAML: restore a mapping

Input

[service]
port = 3010

Expected output

service:
  port: 3010

A table becomes an indented mapping. TOML table headings and digit separators are presentation choices and are not retained.

Errors and unsupported input

- build
- deploy

TOML needs a root table. Give the list a property name, for example tasks: [build, deploy], if that matches the target configuration schema.

service:
  token: null

TOML has no null value. Remove the field or replace it with an application-approved value. The converter rejects nested nulls instead of silently omitting them.

Continue this workflow

Format references

Questions

Frequently asked questions

Can every YAML document become TOML?

No. Use a root mapping and values TOML can represent. Null fields must be handled explicitly and standalone lists need a named property.

Will a round trip keep the same formatting?

No. Parsed values are serialized afresh. Keep your original comments and compare important settings before replacing a file.