How to use the YAML to JSON Converter
- Paste your YAML into the left box, or open a file.
- Adjust the options if you need to.
- Copy the JSON or download it as a file.
What does this tool do?
YAML is popular for configuration (Kubernetes, GitHub Actions, Docker Compose) but its indentation rules are easy to get wrong. The converter validates the YAML, reports errors with line numbers, and shows the equivalent JSON so you can see exactly how it's interpreted.
Files with several documents separated by --- become a JSON array.
Why use it?
- Catch indentation mistakes before deploying.
- See how YAML values are really typed.
- Convert configs for tools that need JSON.
A YAML gotcha
In YAML 1.1, unquoted values like yes, no and on were booleans. The library used here follows YAML 1.2, where only true and false are booleans — the JSON output shows you which one you've got.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
Why does my YAML fail with an indentation error?
YAML uses spaces for indentation and doesn't allow tabs. Items at the same level must line up exactly. The error message shows the line number, so check that line and the one above it.
Will values like yes and no turn into true and false?
Not here. The converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 tools treat yes, no, on and off as booleans too, so quote those values if other tools will read the file.
Last reviewed by the M2Toolkit team.