🧾YAML ↔ JSON Converter
Freely convert between YAML and JSON. Useful for Kubernetes, GitHub Actions, OpenAPI, Docker Compose, and Ansible config files, and quick conversions between the two formats.
How to use
- 1Paste YAML or JSON text.
- 2Choose direction.
- 3Copy the result.
FAQ
Which YAML spec is used?+
YAML 1.2 (via the eemeli/yaml library).
Why convert between YAML and JSON?+
YAML is human-friendly (comments, indentation-based); JSON is machine-friendly. Convert for tool/system compatibility.
What happens to YAML comments in JSON?+
Standard JSON has no comments — comments are lost on YAML → JSON conversion.
Is indentation important?+
YAML uses indentation for structure and is very sensitive. Don't mix tabs and spaces; usually 2-space indentation is used.
How do I check Kubernetes YAML?+
Convert to JSON here and validate with the JSON Formatter, or use a Kubernetes-specific tool like `kubectl --dry-run`.
Are complex YAML (anchors, tags) supported?+
YAML anchors (&), references (*), and tags (!) are mostly supported. Some non-standard extensions may be simplified.