JSON to YAML converter
Paste JSON, get clean YAML — converted live on your device.
Convert JSON to YAML without uploading it
JSON usually becomes YAML on its way into infrastructure: a Kubernetes manifest, a GitHub Actions workflow, a docker-compose file, an OpenAPI spec someone wants to edit by hand. That JSON often came from a live system — an API response, an exported config, a cloud console — and carries hostnames, tokens and account IDs with it. This converter parses and rewrites it in your browser, so none of that is sent anywhere.
The conversion is exact. YAML 1.2 is a superset of JSON, so every object, array, string, number, boolean and null has a direct YAML equivalent, and key order is kept as written.
What changes between the two
- Braces and brackets become indentation. Objects turn into
key: valuelines, arrays into lines starting with-, nested two spaces deeper per level. - Most quotes disappear. Plain strings don't need them in YAML. Strings that would otherwise be read as something else —
"null","1.0", or text containing:— keep their quotes. - You can add comments afterwards. That is often the whole point of the conversion: JSON has no comment syntax, YAML has
#.
One compatibility note: older YAML 1.1 parsers, such as PyYAML's default loader, read unquoted yes, no, on and off as booleans. The output here follows YAML 1.2, where those are strings. If a value like a country code NO will be read by an older tool, quote it.
Other conversions with this tool
How to convert JSON to YAML
- 1
Paste your JSON into the left pane.
- 2
The YAML appears live on the right.
- 3
Copy it, or press Swap to go back.
JSON to YAML — frequently asked questions
Is my JSON uploaded anywhere?
No. The conversion runs in your browser, and this site has no server that could receive your JSON. A Content-Security-Policy blocks requests to other domains; you can confirm in DevTools → Network or by going offline.
Does JSON to YAML lose any data?
No. YAML is a superset of JSON, so every JSON value — objects, arrays, strings, numbers, booleans and null — has a direct YAML equivalent. Key order is preserved.
Why are some strings quoted in the YAML output?
Strings that YAML would otherwise read as another type — like "null", "1.0" or text containing a colon and a space — are quoted so they stay strings when the file is read back. Output follows YAML 1.2, where yes, no and on are plain strings.