JSON ↔ YAML Converter
Runs in your browserConvert JSON to YAML or YAML to JSON. The direction is detected from what you paste. Runs in your browser.
Converted output appears here…
About this tool
JSON and YAML describe the same data with different priorities: JSON is unambiguous and machine-first, YAML is readable and human-first. Which one you need depends entirely on where the data is going — Kubernetes manifests, GitHub Actions workflows and Docker Compose files are YAML, while APIs and configuration loaders overwhelmingly speak JSON. Converting between them is routine, and this tool picks the direction automatically so you can just paste and go.
How to use
- Paste either JSON or YAML — the direction is detected for you.
- Click Convert.
- Copy the result.
When to use this tool
- Turning an API response into YAML for a config file.
- Converting a Kubernetes manifest to JSON to process it with jq.
- Reading a dense JSON payload in a more legible form.
- Migrating configuration between tools that expect different formats.
Tips
- YAML is whitespace-significant — a converted file that loses indentation is broken, so paste the result carefully.
- Comments cannot survive a trip through JSON, because JSON has nowhere to put them.
- If YAML parsing fails, check for tabs — YAML forbids them for indentation.
Limitations
- YAML anchors and aliases are expanded on conversion, and comments are not preserved — JSON has nowhere to put them.
FAQ
- Is my data uploaded?
- No. Parsing and conversion run in your browser. Nothing is transmitted or stored — worth knowing, since config files often contain hostnames and keys.
- Are comments preserved?
- No. Converting YAML to JSON discards comments because JSON has no syntax for them, and the information cannot be recovered on the way back.
- What happens to YAML anchors and aliases?
- They are expanded — each reference becomes a full copy of the value. The data is equivalent, but the structure is no longer shared.