YAML to JSON & JSON to YAML Converter
Convert YAML files (Kubernetes, Docker Compose, GitHub Actions, OpenAPI…) to JSON and back, with syntax validation that points to the exact error line. Everything is processed locally in your browser.
How to convert YAML to JSON
- Paste your YAML into the input panel or open a .yaml / .yml file.
- Click "YAML → JSON". If there is a syntax error you will see its exact line and column.
- For the reverse, paste JSON and click "JSON → YAML".
- Pick the indentation, then copy the result or download it as .json or .yaml.
YAML vs JSON
YAML and JSON describe the same data (objects, lists, strings, numbers and booleans), but YAML uses indentation instead of braces and allows comments, which is why it is the preferred format for configuration files such as Kubernetes manifests, docker-compose.yml or GitHub Actions workflows.
JSON is stricter and is the native format of APIs and JavaScript. Converting between them is common when generating config from code, validating a complex YAML file or sending its content to an API. Note that YAML comments are dropped when converting to JSON, since JSON does not support them.
Frequently asked questions
Does it support multi-document YAML (---)?
Yes. If the YAML contains several documents separated by ---, as Kubernetes files often do, the JSON result is an array with one item per document.
What happens to anchors and aliases (& and *)?
They are resolved during conversion: every alias is replaced by the anchored content, so the resulting JSON is complete and self-contained.
Why are "yes", "no" or "on" not converted to booleans?
The converter follows YAML 1.2, where only true and false are booleans. In YAML 1.1 (used by some older tools) yes/no/on/off were booleans too; if you need them as booleans, change them to true/false.
Are my config files uploaded to a server?
No. The conversion runs in your browser, so you can paste configs with internal details without them leaving your device.