JSON to YAML Converter
Paste JSON on the left and get clean, indented YAML on the right.
About JSON and YAML
JSON is a strict, brace-and-bracket data format used everywhere on the web. YAML is a whitespace-driven, human-readable superset of JSON popular for configuration files (Kubernetes, GitHub Actions, Docker Compose, Ansible). The two map cleanly onto the same data model (objects, arrays, strings, numbers, booleans, null), so most JSON documents convert losslessly into YAML.
What this tool produces
Output is YAML 1.2, generated by js-yaml. Highlights:
- Block style by default (one key per line), with arrays as
- itemlists - Configurable indent (2 or 4 spaces)
- No line-wrapping, so long strings stay on a single line
- Keys that need quoting (reserved words, leading punctuation, embedded colons) are quoted automatically
How it works
Your JSON is parsed with JSON.parse, then serialized to YAML with js-yaml. If the input is not valid JSON, the tool shows the parser error with line and column so you can find it quickly.
Privacy
Conversion runs entirely on your device. The YAML library is fetched once from a public CDN, then your data is parsed and serialized locally. Nothing you paste is uploaded, logged, or sent to a server, so you can safely convert secrets, internal configs, or unreleased data.
Frequently asked questions
Does every JSON document convert cleanly to YAML?
"yes" as a string instead of a boolean).