YAML and JSON Converter
Convert YAML to JSON and back, with readable errors when something does not parse. Handy for Docker Compose, Kubernetes, Ansible and CI files.
🔒 Runs entirely in your browser. Nothing you type is sent anywhere.
How to use it
- Choose the direction: YAML to JSON, or JSON to YAML.
- Paste your input.
- The converted output appears below. If it does not parse, you get the reason instead.
Why convert between them
YAML is easy to read and write, which is why Docker Compose, Kubernetes, Ansible and most CI systems use it. JSON is stricter and is what APIs and many tools expect. Converting between them is handy for checking that a config is valid, for pasting a snippet into a tool that only takes one format, or for spotting an indentation mistake that YAML is hiding.
FAQ
Will it keep my comments? No. YAML comments are dropped when it is parsed into data, so a round trip through JSON and back loses them. This is a limitation of every YAML-to-JSON converter, not just this one.
Why does my YAML fail to parse? Almost always indentation: YAML uses spaces, never tabs, and the nesting has to line up. The error message points at the line.
Is anything sent to a server? No. The conversion runs in your browser.