YAML to JSON Converter
Paste YAML to get the equivalent JSON, or the exact position of the first syntax error. Config files often hold secrets, so the conversion runs entirely in your browser.
Output
🔒 Runs in your browser. Your data is never uploaded.
How to use
- Paste your YAML into the input box.
- Choose 2 or 4 spaces of indentation for the JSON.
- Copy the JSON, or fix the YAML at the reported line and column.
YAML 1.2 rules
This converter follows YAML 1.2, where only true and false are booleans. Words such as yes, no, on and off stay strings. Older YAML 1.1 parsers, PyYAML among them, read those as booleans, which is why a country code of NO can turn into false elsewhere.
What does not survive
JSON has no comments, anchors or multiple documents. Comments are dropped, aliases are replaced by the values they point to, and a file with several documents separated by --- becomes a JSON array.
Frequently asked questions
- Why does my YAML fail with a tab error?
- YAML forbids tab characters for indentation. Replace the tabs with spaces; the error message gives the line where the first tab was found.
- Is JSON valid YAML?
- Almost always. YAML 1.2 was designed as a superset of JSON, so you can paste JSON here and it will parse.
- Is my YAML sent to a server?
- No. Parsing runs in your browser with JavaScript, so Kubernetes manifests and CI configs never leave your machine.