Convert JSON to YAML
Paste, upload, or drop JSON on the left — clean, indented YAML appears live on the right as you edit. Copy or download it, no separate convert step.
Actions▾
JSON to YAML for config files and CI pipelines
YAML and JSON describe the same underlying data — objects, arrays, strings, numbers, booleans, null — but YAML uses indentation instead of braces and quotes, which is why it's the default format for most config files: Docker Compose, Kubernetes manifests, GitHub Actions workflows, and countless CI/CD tools all read YAML. This converter takes your JSON and produces the equivalent YAML usingjs-yaml, a standard, widely used library, so the output is valid YAML 1.2 any parser can read back correctly.
The conversion is live — edit the JSON on the left and the YAML on the right updates as you type, indented to match your chosen indent width (2, 3, or 4 spaces — YAML doesn't allow literal tabs, so a tab setting falls back to 2 spaces for this output only). Copy it to the clipboard or download it as a .yamlfile directly from the preview panel.
Need XML or CSV instead? The same document converts live toXML orCSV too — just switch the "View" dropdown.
Why would I convert JSON to YAML?
YAML is the format of choice for most config files — Docker Compose, Kubernetes manifests, GitHub Actions workflows, CI pipelines — because it drops JSON's braces and quotes in favor of indentation, making it easier for a person to hand-edit. Converting an existing JSON config to YAML is a common first step when adopting one of those tools.
What indent width does the YAML use?
Whatever you've set in the toolbar — 2, 3, or 4 spaces. YAML doesn't allow literal tabs for indentation (it's invalid per the spec), so choosing the "Tab" indent option falls back to 2 spaces for the YAML output specifically, even though it still applies to the JSON editor and other formats.
Are comments or key ordering preserved?
JSON has no concept of comments, so there's nothing to carry over — the YAML output is generated fresh from the parsed data. Key order matches the order in your JSON object, and array order is always preserved.
Is this safe for config files I'll actually use?
Yes — the conversion runs through js-yaml, a widely used YAML library, and produces valid YAML 1.2 that any standard YAML parser (Python's PyYAML, Ruby's Psych, Kubernetes, etc.) will read correctly.