About this tool
Paste YAML (a Kubernetes manifest, a GitHub Actions or GitLab CI workflow, a Docker Compose file, an OpenAPI spec or any config) and get the equivalent JSON. It doubles as a YAML validator: syntax errors are shown with the line, the column and the lines around the problem.
What gets converted
- Anchors, aliases and merge keys (
&defaults,*defaults,<<: *defaults) are expanded, since JSON has no references. - Multi-document files separated by
---become a JSON array, or just the first document. - Types follow YAML 1.2:
yes,no,onandoffstay strings (in YAML 1.1 they were booleans, a classic surprise), and dates like2025-03-14stay strings. - Comments are dropped, because JSON can’t hold them.
Integers beyond 253 can’t be represented exactly in JSON parsers like JavaScript’s, so quote them in the YAML if precision matters. The parser is js-yaml, running in your browser. To go the other way, use JSON to YAML.
FAQ
How do I convert YAML to JSON?
Paste the YAML above. The JSON appears as you type, with any syntax errors shown by line and column.
Are YAML anchors supported?
Yes. Anchors, aliases and << merge keys are resolved, so the JSON contains the full values.
Why does yes stay a string?
The converter follows YAML 1.2, where only true and false are booleans. YAML 1.1 also treated yes, no, on and off as booleans.
Can it convert files with several documents?
Yes. Documents separated by --- become a JSON array, or choose “First only”.
Is my YAML uploaded?
No. It is parsed in your browser.