What does the JSON to YAML converter do?
It converts JSON into YAML as you type. YAML represents the same data with indentation instead of braces and quotes, which is why it is the usual format for Kubernetes manifests, Docker Compose files, GitHub Actions workflows and other configuration files. The output uses two-space indentation and can be copied or downloaded as a .yaml file.
The converter also works in reverse. Click Swap direction and the current YAML moves into the input, so the output shows it converted back to JSON. You can also paste your own YAML there.
How do you convert JSON to YAML?
- Paste your JSON into the input editor.
- The YAML output updates immediately. If the JSON is invalid, the error is shown instead.
- Click Copy result or Download to save the YAML.
Frequently asked questions
Is YAML a superset of JSON?
YAML 1.2 is designed so that almost every JSON document is also valid YAML. The reverse is not true: YAML supports comments, anchors and multi-line strings that have no JSON equivalent.
What happens to YAML comments when converting to JSON?
They are dropped, because JSON has no comment syntax. Only the data is kept.
Can I convert YAML to JSON too?
Yes. Click Swap direction: the YAML output moves into the input and the output shows JSON, formatted with two-space indentation. You can also paste your own YAML into the input.
Is my data uploaded?
No. The conversion runs entirely in your browser and your data stays on your device.