JSON to YAML Converter
Convert JSON to YAML or YAML to JSON with full fidelity.
JSON and YAML, interchangeable
JSON and YAML describe the same data model in different ways. YAML is easier for humans to write (indentation instead of braces); JSON is easier for machines to parse. This converter lets you flip between them without fighting syntax.
Common conversion jobs
- Kubernetes manifests — you have a JSON API response from
kubectl get ... -o jsonand want a YAML file you can edit and reapply. - CI configs — GitHub Actions, GitLab CI and CircleCI all take YAML; you might be generating that config from a JSON template.
- Terraform and Ansible — most infra tooling takes YAML but returns JSON from its planning steps.
- OpenAPI schemas — frequently authored in YAML but consumed by tools that prefer JSON.
A note on formatting
JSON is stricter than YAML. When converting from YAML, any features that don’t round-trip through JSON (comments, multi-document streams, custom tags) are lost. The shape of the data is preserved, but style is not.
Everything runs in your browser — useful when the YAML might contain secrets like API keys you don’t want to paste into a remote service.
Frequently asked questions
- Does the converter preserve the order of keys?
- Yes, for both directions. YAML's dump routine follows insertion order, and JSON keys are emitted in the order they were parsed.
- What about comments in YAML?
- JSON does not support comments, so any comments in your YAML input will be dropped when converting to JSON. Converting back again will not reintroduce them.
- Which YAML version is supported?
- YAML 1.2 (the current standard). Anchors, aliases, multi-document streams and most tag shorthands are handled. Very unusual custom tags may fail to parse.