JSON to YAML Converter

Convert JSON to YAML instantly. Free online tool — paste JSON, get YAML, copy or download. No signup, no upload.

Converter
Direct answer

To convert JSON to YAML, paste your JSON below — the YAML output appears instantly. JSON's curly braces become indentation, double quotes around keys are dropped, and arrays use dashes (-) instead of brackets.

Ad
JSON input
YAML output

About JSON → YAML

YAML (YAML Ain't Markup Language) is a human-readable superset of JSON, used heavily in DevOps configurations like Kubernetes manifests, Docker Compose files, GitHub Actions workflows, and Ansible playbooks. While JSON is strict and machine-friendly, YAML trades some strictness for readability — significant whitespace replaces braces, comments are allowed, and strings rarely need quoting.

JSON vs YAML

 JSONYAML
WhitespaceInsignificant (any indentation)Significant (indentation defines structure)
CommentsNot supportedSupported with #
QuotesRequired for keys and string valuesUsually optional
File extension.json.yaml or .yml
Best forAPIs, JS interopHuman-edited config files
Ad

Frequently asked questions

Is YAML a superset of JSON?
Effectively yes — every valid JSON document is also valid YAML 1.2. So YAML parsers can read JSON, but JSON parsers cannot read YAML.
Why does my YAML have empty values appear as null?
YAML treats `key:` (empty value) as null. If you want an empty string, write `key: ""`. If you want an empty list, write `key: []`.
Should I use 2 or 4 space indentation?
YAML doesn't care, but you must be consistent within one file. Two spaces is the most common convention (and what this converter outputs).
Why is YAML used for Kubernetes and CI/CD?
These configs are written and reviewed by humans daily. YAML's comments, lack of trailing-comma issues, and natural list syntax make it dramatically easier to read in code reviews than JSON.

Related tools