YAML to JSON Converter
Convert YAML to JSON in your browser, pretty or minified, with line-numbered error messages.
JSON output
Paste YAML above to see the JSON instantly.
How it works
Paste YAML on the left and the converter parses it with a full YAML 1.2 parser running
inside your browser, then re-serialises the result as JSON โ instantly, as you type.
Choose 2-space, 4-space or tab indentation for readable output, or switch to Minified
for the smallest possible payload. Multi-document YAML files (documents separated by
---) are converted into a JSON array, one entry per document, and YAML
anchors and aliases (&name / *name) are expanded for you.
If the YAML is invalid you get the line number and the reason instead of a silent failure, which makes this handy for debugging indentation mistakes in CI configs, Kubernetes manifests, OpenAPI specs and Docker Compose files. Nothing is uploaded: the conversion happens entirely in JavaScript on your device, so config files with secrets, hostnames or tokens never leave your machine.
Frequently asked questions
How do I convert YAML to JSON online?
Paste your YAML into the input box and the JSON appears instantly below it. Pick 2-space, 4-space, tab or minified formatting, then use Copy JSON or Download .json. There is nothing to install and no account needed.
Is it safe to convert YAML files that contain secrets?
Yes. The conversion runs entirely in your browser with JavaScript, so your YAML is never uploaded to a server or logged. That makes it safe for Kubernetes manifests, CI pipelines and Docker Compose files that contain tokens, hostnames or internal URLs.
Does the converter support multi-document YAML files and anchors?
It does. Documents separated by --- are converted into a JSON array with one entry per document, and YAML anchors and aliases (&name / *name) are expanded into their full values. Comments are dropped, because JSON has no way to represent them.