TOML → YAML Converter
Convert TOML to YAML locally. TOML datetimes become ISO-8601 strings; the conversion is otherwise lossless.
TOML vs YAML — format philosophy
TOML is designed to be an unambiguous configuration format where every value has an explicit type. YAML is a more expressive superset of JSON that supports anchors, multi-line strings, and implicit type coercion. Converting TOML to YAML is mostly lossless — all TOML types map cleanly to YAML equivalents.
Input
[server] host = "localhost" port = 8080 debug = true [[features]] name = "auth" enabled = true [[features]] name = "logging" enabled = false
Output
server:
host: localhost
port: 8080
debug: true
features:
- name: auth
enabled: true
- name: logging
enabled: falseType mapping
| TOML type | YAML output | Notes |
|---|---|---|
| String | Unquoted or quoted string | Quoted only when necessary (spaces, colons, etc.) |
| Integer | Integer | Native YAML integer |
| Float | Float | Native YAML float; inf/nan become strings |
| Boolean | true / false | Native YAML boolean |
| Datetime (RFC) | ISO-8601 string | YAML has no datetime literal — quoted string |
| Array | YAML sequence | - item per line |
| Table [x] | YAML mapping | Nested under key x |
| Array of tables | YAML sequence of mappings | [[x]] becomes - x: … |
Note: TOML datetimes (e.g.
2024-01-15T10:30:00Z) are serialised as ISO-8601 strings in YAML. They will be quoted to prevent YAML parsers from misinterpreting them.Array of tables
TOML's [[array-of-tables]] syntax is the idiomatic way to express arrays of objects. These map cleanly to YAML sequences of mappings — one of the most common YAML patterns for configuration lists.
Input
[[servers]] name = "prod" ip = "10.0.0.1" [[servers]] name = "staging" ip = "10.0.0.2"
Output
servers:
- name: prod
ip: 10.0.0.1
- name: staging
ip: 10.0.0.2Frequently Asked Questions
Your files stay on your computer. Dad promised.