JSON ↔ YAML Converter
Convert JSON to YAML or YAML to JSON. Edit either side and the other updates automatically.
JSON and YAML represent the same data structures but with different syntax. YAML is a superset of JSON — all valid JSON is valid YAML. YAML is more human-readable for configuration files because it uses indentation instead of braces and brackets, and it supports comments. JSON is more widely supported for data interchange and API responses. Docker Compose, Kubernetes manifests, GitHub Actions workflows, and most CI/CD pipeline configs use YAML. Web APIs almost universally use JSON.
Frequently asked questions
Can YAML represent everything JSON can?
Yes. YAML is a superset of JSON. Any valid JSON document is valid YAML. YAML can also represent additional features like anchors, aliases, and multi-line strings that JSON does not support.
Why does YAML sometimes produce unexpected results?
YAML has some surprising type inference. Values like "yes", "no", "true", "false", "null", and bare numbers are automatically typed. A version number like "1.10" might be parsed as the number 1.1. Wrapping values in quotes forces string interpretation.