YAML to JSON Converter
Convert YAML to JSON
What Is This Tool?
The YAML to JSON Converter parses common YAML documents — mappings, block sequences, and simple flow collections — and converts them into pretty-printed JSON. It supports the everyday subset of YAML used in config files, not the full YAML 1.2 specification. Everything runs locally in your browser.
How to Use
Paste your YAML into the input box.
Click Convert to parse it into JSON.
Copy the result or download it as a .json file.
Features
- Indentation-based nesting for mappings and sequences
- Supports simple inline flow collections like
[a, b]and{a: 1} - Recognizes strings, numbers, booleans, and null
- Copy to clipboard or download as a file
- 100% client-side — nothing leaves your browser
Examples
Before (YAML):
name: Ada Lovelace active: true roles: - admin - editor
After (JSON):
{
"name": "Ada Lovelace",
"active": true,
"roles": ["admin", "editor"]
}
Common Use Cases
- Converting Kubernetes or Docker Compose config to JSON for scripting
- Debugging a CI/CD YAML pipeline by viewing it as JSON
- Feeding YAML config into a JSON-only tool or API
- Comparing YAML config against a JSON schema
Frequently Asked Questions
Does this support the full YAML specification?
No. It supports only the common subset used in most config files: indentation-based mappings and sequences, scalars, and simple inline flow collections. Advanced features like anchors, aliases, multi-document files, and folded/literal block scalars are not supported.
What happens with unsupported YAML features?
The parser will either misinterpret the value or show an error referencing the line where it got confused. If you hit this, simplify the YAML to the supported subset described above.
How are inline flow collections handled?
Inline arrays like [a, b, c] and inline objects like {a: 1, b: 2} are parsed directly, in addition to the standard block style.
Why do I get a parse error on valid-looking YAML?
Common causes are mixed tabs and spaces (tabs are converted to spaces but can shift indentation), inconsistent indentation between sibling keys, or a YAML feature outside the supported subset.
Is my data uploaded anywhere?
No. Parsing happens entirely in your browser using JavaScript. Nothing is sent to a server.
Can I download the result?
Yes, click Download to save the JSON output as a data.json file.