What is the YAML to JSON Converter?
YAML is the configuration format behind Kubernetes, Docker Compose, GitHub Actions, OpenAPI specs and Ansible. It is easy for people to write but easy to get wrong, because indentation carries meaning. This YAML to JSON converter parses your YAML and shows exactly what data it contains as JSON, which makes indentation mistakes and unexpected types obvious.
It supports block and flow collections, quoted and multi-line strings (| and >), comments, anchors and aliases (&env, *env), merge keys (<<) and multiple documents separated by ---. Errors show the line number. Conversion runs in your browser, so secrets in config files stay private.
How to use the YAML to JSON Converter
- Paste your YAML on the left, or click Sample.
- Click Convert to JSON. Pasting converts automatically.
- Fix any error using the line number shown, then copy the JSON.
Frequently asked questions
Why is "no" or "on" not turned into false?
This converter follows YAML 1.2, where only true and false are booleans. YAML 1.1 parsers also treat yes, no, on and off as booleans, which famously turned the country code NO (Norway) into false. Quote such values to be safe with every parser.
What happens with multiple documents?
A file with several documents separated by ---, such as a Kubernetes manifest with many resources, becomes a JSON array with one item per document.
Why do I get "Tabs are not allowed"?
The YAML specification forbids tab characters for indentation. Replace them with spaces; most editors can do this automatically.