YAML ⇄ JSON Converter
Convert in either direction. Invalid input shows the line where parsing failed.
YAML
JSON
About YAML and JSON
YAML is the config language of Kubernetes, Docker Compose, GitHub Actions and many CI tools. JSON is what most APIs speak. YAML is a superset of JSON, so any JSON document is also valid YAML. The reverse doesn't hold: comments, anchors and multi-line strings have no JSON equivalent.
Things to know
- Comments in YAML are dropped when converting to JSON.
- Anchors and aliases (
&and*) are expanded into full copies. - Multi-document YAML (separated by
---) becomes a JSON array.