Why convert YAML to JSON?
- To send config data to an API or tool that only accepts JSON.
- To check how a YAML file is actually interpreted — indentation mistakes and unquoted values become obvious in JSON.
- To use
jqor JavaScript on data that's stored as YAML.
Surprises YAML can hide
| YAML | Becomes |
|---|---|
version: 1.10 | 1.1 (a number — quote it to keep “1.10”) |
port: 08080 | a string or number depending on the parser — quote it |
empty: | null |
This converter follows YAML 1.2 (via js-yaml), where yes/no stay strings. Some older YAML 1.1 tools turn them into booleans.
Multiple documents
Files with several documents separated by --- need to be converted one document at a time.


