JSON is the language of APIs; YAML is the language of config files. They hold the same kind of data — objects, lists, values — but YAML drops the braces and quotes in favour of indentation, which makes hand-written config far easier to read. Converting between them is a routine part of DevOps work.
The one rule that breaks YAML
YAML uses spaces, never tabs, and indentation is significant — the number of spaces defines the structure. A single stray tab or a misaligned line changes the meaning or throws a parse error. When you convert from JSON you sidestep this entirely, because the converter produces correct, consistent indentation for you.
How to convert
- Open the JSON to YAML converter and paste valid JSON.
- Copy the YAML output into your config file.
- It runs in your browser, so a config full of secrets or hostnames never leaves your machine.
Where YAML shows up
If you work with Docker Compose, Kubernetes, GitHub Actions, or most CI systems, you are writing YAML. Converting a known-good JSON object to YAML is a reliable way to get the syntax right the first time instead of fighting indentation errors.
Keep quotes around values that look like something else — yes, no, on, off and version numbers like 1.10 can be misread by YAML unless quoted. A good converter quotes these for you.