YAML to JSON converter

Convert YAML to JSON in your browser, with parse errors reported by line number. Multi-document files supported. Nothing is uploaded.

About this converter

Going from YAML to JSON is usually about tooling rather than preference. Something in your pipeline - a validator, a schema checker, a jq command, an API that only accepts application/json - needs JSON, and what you have is a Helm values file or a CI workflow.

It is also the fastest way to debug a YAML file that is not behaving. YAML’s indentation rules and implicit typing make it easy to write something that parses successfully but means the wrong thing. Converting to JSON makes the parsed structure explicit: you can see immediately whether a value came through as the string 3.0 or the number 3, whether that list is nested where you thought it was, and whether the off you wrote became the boolean false.

This tool accepts YAML 1.2, reports parse errors with a line number rather than a generic failure, and lets you choose between indented output for reading and minified output for pasting into a request body. Multi-document files separated by three dashes produce a JSON array with one element per document.

The conversion runs entirely in your browser. Nothing is uploaded, which matters because YAML files are exactly where secrets, hostnames and internal service names tend to live.

Frequently asked questions

Why did my value off become false?
That is YAML implicit typing. Quote the value in your YAML to keep it a string. Seeing this in the JSON output is precisely why the conversion is a useful debugging step.
Does it support multi-document YAML?
Yes. Documents separated by three dashes are emitted as a JSON array with one element per document.
Are anchors and aliases resolved?
Yes. References are expanded into their full value in the JSON output.

Related converters