How to convert YAML to JSON
- Paste YAML into the left box, or press "Open file" to load a .yaml or .yml file.
- The JSON appears on the right as you type. Errors point to the exact line.
- Copy the result or download it.
Press "Switch to JSON → YAML" to convert in the other direction, for example to turn an API response into a readable config.
Questions
Is my file uploaded?
No. Conversion runs in your browser, so configs with hostnames, keys, or internal names stay on your device.
Does it handle several YAML documents in one file?
Yes. Documents separated by --- become a JSON array, one item per document. This is common in Kubernetes manifests.
Are comments kept?
No. JSON has no comments, so YAML comments are dropped when converting. Keep the original YAML if you need them.
Why does my YAML give an error?
The most common causes are tabs used for indentation (YAML needs spaces), inconsistent indentation, and a colon inside an unquoted value. The message shows the line and column to check.
Credits
Built on js-yaml (MIT). OneTooling is not affiliated with that project.