JSON to YAML
How to use
Converts JSON into clean, readable YAML. Drop the JSON file, choose the indentation, and download.
Step 1 of 4: Upload
- 1
- 2
- 3
- 4
Step 1 of 4 · Upload
- 1Upload
- 2Options
- 3Convert
- 4Download
- Turning a JSON config into a commented YAML file
- Converting an OpenAPI or Swagger spec to YAML for easier editing
- Writing Kubernetes or Docker Compose files from JSON output
- Making API responses easier to read in documentation
Free and private. Everything runs on your own device, with no account and no uploads.
JSON is ideal for machines and tiring for people: quotes on every key, braces everywhere, no comments. YAML expresses the same data with indentation alone, which is why configuration files for Kubernetes, CI pipelines and OpenAPI are usually written in it. This converter turns JSON into clean, readable YAML, quoting only the values that would otherwise be misread, so the result parses back to exactly the same data.
Yes. Values such as "true", "007" or "2024-01-01" that are strings in the JSON are quoted in the YAML, so a round trip returns identical data.
No. Lines are never folded, so long URLs and keys stay on one line and copy cleanly.
Yes: that is one of the main reasons to switch to YAML. Add # comments anywhere in the output.
You will see the parser's error message. The JSON Formatter can help locate and fix the problem.
- 1
Add a JSON file
Drop an API response, config or spec in JSON.
- 2
Choose indentation
2 spaces is the convention for most YAML files.
- 3
Convert
Strings that look like numbers, booleans or dates are quoted to keep their meaning.
- 4
Download the YAML
Ready to paste into a config or add comments to.
- ·Review keys with special characters; they are quoted automatically but may look unusual
- ·Keep the JSON if another program consumes it; YAML is for people
- ·Use 2-space indentation to match most linters and style guides