What is JSON ⇄ YAML conversion?
YAML is a favorite for config files — it replaces JSON’s braces with indentation, which is easier to read and write. JSON is the universal format for code and APIs. This tool converts between the two, so you can feed a config file to your program or turn an API response into readable YAML. Everything runs locally in your browser, with no upload.
How to use
- Paste JSON or YAML into the input box (you can also drop in a file).
- Click JSON → YAML or YAML → JSON.
- Copy or download the result; if the syntax is invalid, the status bar explains why.
Common use cases
- Turn a JSON API response into readable YAML config.
- Convert hand-written YAML config into JSON your code can parse.
- Need to beautify or validate JSON? Pair it with the JSON formatter; to move to spreadsheets use JSON ⇄ CSV ⇄ Excel.
Why did my YAML comments disappear after converting to JSON?
Convert a Docker Compose or CI YAML config to JSON for a program to read, and you'll notice the # comments are all gone — that's expected, not a bug: JSON has no comment syntax, so there's nowhere to put them. Two other YAML traps worth knowing: indentation must use spaces, never mixed tabs — one space off and the meaning changes; and unquoted no / yes / on / off become booleans, so the country code NO can turn into false — quote values that look like booleans. Want to tidy the JSON afterwards? Follow up with the JSON formatter.