JSON to YAML converter
Convert JSON to clean, readable YAML for configs.
About the JSON to YAML tool
This JSON to YAML converter rewrites JSON as YAML, the format used by Kubernetes, Docker Compose, GitHub Actions and many config files. It checks the JSON first and shows the line and column of any error, so a missing comma is easy to find. You can choose 2 or 4 space indentation and sort keys A to Z, then copy the result or download data.yaml. Conversion runs in your browser with the js-yaml library, so API keys in a config never leave your device.
At a glance
- Input
- JSON, checked first with line and column errors
- Output
- YAML (data.yaml), 2 or 4 space indent, optional A to Z key order
- Method
- js-yaml in your browser; strings like "yes" or "08" are quoted
- Price
- Free, no sign-up
- Works in
- Your browser, on phone or computer. Works offline after the first visit.
- Privacy
- What you type never leaves your device.
How to convert JSON to YAML
- Paste your JSON or open a .json file.
- Choose the indent and whether to sort keys.
- Copy the YAML or download it as data.yaml.
Private
Your text stays in your browser and is never sent to a server.
Instant
Results update as you type, with nothing to install.
Free
No sign-up, no limits and no ads inside your writing space.
JSON to YAML: frequently asked questions
Is YAML the same data as JSON?
Yes for everyday data. YAML 1.2 is a superset of JSON, so objects, arrays, strings, numbers, true/false and null convert without loss.
Why are some values wrapped in quotes in the YAML?
Strings that YAML could misread, such as "yes", "08" or "2024-01-01", are quoted so they stay text when the file is read again.
Are comments kept?
JSON cannot contain comments, so there are none to keep. You can add # comments to the YAML afterwards.
Is my text sent anywhere?
No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.



