JSON to YAML Converter
Convert JSON to YAML in your browser with clean, spec-compliant output. Copy or download the result; nothing is uploaded.
What is a JSON to YAML converter?
JSON and YAML describe the same data model, but YAML drops the braces and quotes in favour of indentation and is far easier to read and hand-edit. A converter rewrites a JSON document as equivalent YAML without changing any value.
Use it to move an API response into a Kubernetes manifest, an Ansible playbook or a CI config where YAML is the expected format.
How to convert JSON to YAML
- Paste the JSON document into the editor.
- Confirm the status bar reports it as valid JSON.
- Switch to the Convert tab and select YAML.
- Review the output — strings that need quoting keep their quotes.
- Copy or download the .yaml result.
JSON to YAML examples
Object
{"name":"web","replicas":3,"image":"nginx:1.27"}name: web replicas: 3 image: nginx:1.27
Nested list
{"env":[{"name":"MODE","value":"prod"}]}env:
- name: MODE
value: prodJSON vs YAML
| Dimension | JSON | YAML |
|---|---|---|
| Readability | Structured but noisy | Compact, indentation based |
| Comments | Not supported | Supported |
| Data model | Objects, arrays, scalars | Superset of JSON |
| Safe parsing | Strict | Needs a safe loader |
| Typical use | APIs and wire format | Config files and manifests |
FAQ
Frequently Asked Questions & Specs
Is the YAML output spec compliant?
Serialisation is handled by js-yaml, so quoting and multi-line scalars follow the YAML 1.2 spec.
Are my files uploaded?
No. Conversion happens entirely in your browser.
JSON to YAML Converter
- YAML output uses 2-space indentation and no line wrapping.
- Paste an object or array — any valid JSON converts.