YAML to JSON converter
To convert YAML to JSON, drop your YAML file in the box below. It converts straight away; press Download to save the JSON. It all happens in your browser, so your file stays on your device.
Convert to
Converted on this device, never uploaded
What changes
| YAML to JSON | What happens |
|---|---|
| Reads | Maps, lists, quoted and plain values, | and > blocks, [flow] and {flow} collections, comments |
| Several documents | Separated by ---, they become a JSON array |
| Values | YAML 1.2 rules: true/false, null and numbers are typed; yes, no and dates stay text |
| Not supported yet | Anchors and aliases (& *), tags (!), merge keys (<<) and ? keys: refused with the line number |
| Errors | Named with the line, for tabs, duplicate keys and bad indentation |
How to convert YAML to JSON
- Add your YAML. Drop the file in the box, or click to choose it. It becomes JSON straight away.
- Check the result. Look at the preview. The delimiter and value types are set for you; change them if needed.
- Download. Press Download to save the JSON.
Why JSON
Turn a YAML config into JSON for a script, an API or a tool that only reads JSON.
Questions
Not yet. A file that uses & or * gets a clear message with the line, rather than a wrong result.
In YAML 1.2, which most current tools use, only true and false are booleans. yes, no, on and off are text.
Documents separated by --- become one JSON array, one item per document.
No. The conversion happens right in your browser, so your file stays on your device. There is no account to make, either.