Readable YAML from JSON, with ambiguous values quoted safely
YAML to JSON Converter
Turn a Kubernetes manifest, compose file or CI config into JSON, or the other way round, and see exactly where it breaks.
Loading tool…
How to use yaml to json converter
Paste YAML or open a .yaml or .yml file.
Pick 2 spaces, 4 spaces or minified JSON.
Fix any error shown with its line, column and the line itself.
Copy or download the JSON, or switch direction to carry the result back to YAML.
What this tool does
- Reads block and flow style, quoted and plain text, literal | and folded > blocks with their chomping signs.
- Expands anchors, aliases and << merge keys, and stops alias bombs before they fill memory.
- A file with several --- documents becomes a JSON array, one entry per document.
- Warns about values like yes, no, on and leading-zero numbers that older YAML 1.1 readers treat differently.
How the result is verified
The JSON is parsed again and compared value for value with the YAML that was read. In the other direction the YAML written is read back and compared with your JSON.
Frequently asked questions
Why is my 'no' still the text "no"?
YAML 1.2, used by current tools, treats only true and false as booleans. Older YAML 1.1 readers turn yes, no, on and off into booleans, so the converter warns you when it sees them.
What happens to anchors and aliases?
Each alias is replaced by a full copy of the anchored value, and merge keys (<<) are applied, so the JSON contains the final values your tools would see.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Validate YAML, fix indentation and view it as JSON
Beautify or minify JSON with your choice of indentation
Find JSON syntax errors with the exact line and column
Pretty print or minify XML, checked by re-parsing