JSON to YAML
Convert JSON to clean, readable YAML.
JSON to YAML Converter Online
The JSON to YAML converter transforms JSON into clean, human-friendly YAML. Braces and brackets disappear, nesting is shown by indentation, lists use dashes, and quotes are kept only where they're needed to preserve the data type. Paste JSON and copy YAML — no install, no upload.
Why YAML?
YAML is the configuration language of modern infrastructure: Kubernetes manifests, Helm charts, Docker Compose files, GitHub Actions and GitLab CI pipelines, Ansible playbooks, OpenAPI specs, and countless app configs. Many tools export or accept JSON, but humans prefer to read and maintain YAML. Converting is lossless: YAML 1.2 is a superset of JSON, so the data is exactly the same.
Safe by default
YAML has a few famous pitfalls — the "Norway problem" where NO becomes false, version numbers like 1.10 turning into 1.1, or strings containing : breaking the structure. The converter uses the maintained yaml library, which automatically quotes any string that would otherwise change meaning. Numbers, booleans, and nulls stay unquoted and keep their types.
Options
- Indentation – 2 spaces (the most common convention) or 4 spaces.
- Quote all strings – writes every string in double quotes, useful when a downstream tool uses an older YAML 1.1 parser.
Example
{"name": "web", "ports": [80, 443], "tls": true} becomes:
name: webports:- 80- 443tls: true
Related tools
Need the other direction or other formats? Convert with JSON to XML, TOML to JSON, or format the source first with the JSON Beautifier.
Frequently Asked Questions
Is YAML a superset of JSON?
Since YAML 1.2, yes: every valid JSON document is also valid YAML. Converting to YAML's block style simply makes the same data easier to read and edit by removing braces, brackets, and most quotes.
Why are some strings still quoted?
Strings that YAML would otherwise read as something else keep their quotes: "yes", "no", "true", "null", numbers like "1.10", and text containing ": " or starting with special characters. That keeps the data identical after conversion.
Can I convert Kubernetes or Docker Compose JSON?
Yes. Paste the JSON (for example from kubectl get -o json) and you get YAML in the usual block style, with lists written as dashes, ready for a manifest file.
Are comments added?
No. JSON has no comments, so there's nothing to carry over. You can add YAML comments (#) to the output by hand.