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

  1. Paste the JSON document into the editor.
  2. Confirm the status bar reports it as valid JSON.
  3. Switch to the Convert tab and select YAML.
  4. Review the output — strings that need quoting keep their quotes.
  5. 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: prod

JSON vs YAML

DimensionJSONYAML
ReadabilityStructured but noisyCompact, indentation based
CommentsNot supportedSupported
Data modelObjects, arrays, scalarsSuperset of JSON
Safe parsingStrictNeeds a safe loader
Typical useAPIs and wire formatConfig 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.

All Tools