How to use the YAML ⇄ JSON Converter
- Paste YAML on the left (or JSON on the right).
- Click the conversion direction.
- Copy the result.
About this tool
YAML dominates infrastructure: Kubernetes manifests, GitHub Actions workflows, Docker Compose and OpenAPI specs are all YAML. But many APIs and programming tools want JSON. Because YAML is a superset of JSON, conversion is lossless for normal data — but YAML's indentation rules make subtle mistakes common.
This converter uses the widely adopted open-source js-yaml parser (loaded from cdnjs on first use) and reports the exact line of any indentation or syntax error.
no, yes, on and off may be parsed as booleans by older YAML 1.1 parsers (“the Norway problem”). Quote country codes and flags to be safe.Frequently asked questions
Are comments preserved?
No — JSON has no comments, so they are dropped when converting from YAML.
Multi-document YAML (---)?
Only the first document is converted.