About this tool
Convert YAML config files to JSON for APIs and tooling. Anchors and merge keys are expanded, multiple documents become an array, and syntax errors show their exact location. Files built to expand endlessly through aliases are stopped before they can freeze your browser.
How to use it
- Paste YAML or import a file.
- Choose the output indentation.
- Review any warnings, then copy or download the JSON.
Example
base: &base retries: 3 prod: <<: *base host: api.example.com
{
"base": {
"retries": 3
},
"prod": {
"retries": 3,
"host": "api.example.com"
}
}Questions
- What happens to YAML comments?
- JSON has no comments, so they're dropped, and a warning tells you when that happens.
- How are multiple documents handled?
- A file with several documents separated by --- becomes a JSON array with one item per document.
- Is this safe for untrusted YAML?
- It only reads data and never runs anything in the file. Alias expansion is capped to stop “billion laughs” files, and strict parsing rejects duplicate keys.