JSON to YAML Converter
Paste JSON below and Donfig converts it to YAML on the fly. Useful for moving config between formats: JSON-based API responses become Kubernetes manifests, GitHub Actions workflows, or Ansible playbooks with the same data shape. The converter preserves key ordering, handles arrays of objects, and supports nested structures of any depth. Output indentation is configurable (2, 3, or 4 spaces). Use the Style toggle to switch between human-readable block YAML and compact flow YAML. Conversion runs entirely in your browser — no upload, no rate limits, no telemetry on your data.
JavaScript is required to use the live tool. Please enable JavaScript and reload.
Frequently asked
Does YAML preserve every JSON feature?
Yes for the common case. JSON's null, booleans, numbers, strings, objects, and arrays all map cleanly to YAML scalars and collections.
Why convert from JSON to YAML?
YAML is more readable for humans editing config (Kubernetes, CI pipelines, app config). JSON is better for machine-to-machine APIs. Many teams keep both forms in different parts of the same system.
Can I go back from YAML to JSON?
Yes — open the YAML to JSON page (linked below) for the reverse direction.