Convert YAML to JSON and JSON to YAML instantly in your browser, with live validation and error messages.
YAML and JSON describe the same data model — maps, lists, strings, numbers, booleans and null — with different syntax. YAML uses indentation and is comfortable to write by hand, which is why Kubernetes manifests, GitHub Actions workflows, Docker Compose files and OpenAPI specs use it. JSON uses braces and is what most APIs and programs consume. This converter moves cleanly between the two in either direction.
Conversion is live: type or paste on the left and the result appears on the right, with a precise parse error (including the line) if the input is malformed. Hit the swap button to flip direction and carry the current output across as the new input — handy for round-tripping a file to check nothing was lost.
Two things do not survive the trip to JSON: comments and anchors. JSON has no comment syntax, so # lines are dropped, and YAML anchors/aliases are expanded into their full values. Also note that unquoted yes, no, on and off are booleans in YAML — quote them if you meant strings. Everything runs locally; no file is uploaded.