Why it matters
Config lives in all three formats: Kubernetes and GitHub Actions use YAML, Cargo and Python projects use TOML, and APIs speak JSON. Moving settings between them by hand invites indentation mistakes and silent type changes.
YAML in particular has traps: unquoted 'no' or 'on' may become booleans in older parsers, and anchors make files hard to read. This converter uses a parser written for this site, shows exactly where an error is, expands anchors so you can see the real values, and flags anything TOML can't represent, such as null.
How it works
- InputA config file in any of the three
- In your browserParsed to one data model, checked for YAML gotchas
- OutputThe same data in the other formats
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| Format | Bytes |
|---|---|
| JSON | 727 |
| YAML | 502 |
| TOML | 531 |
How to use it
- Paste a file in YAML, JSON or TOML, or let the tool detect it.
- Fix any error at the line shown.
- Read the other two formats side by side.
- Download the one you need.
FAQ
Does it keep comments?
No. Comments aren't part of the data in any of the three formats, so they can't be carried across.
What happens to null when writing TOML?
TOML has no null. Those keys are left out and listed in a warning.
Is 'no' a boolean?
Not in YAML 1.2, which this tool follows: only true and false are booleans. Older YAML 1.1 tools read no, yes, on and off as booleans, so quote them if other tools read the file.
Are anchors kept in the YAML output?
They are expanded, so each value is written out in full. That's clearer, though longer.