JSON to YAML Converter
Convert JSON into clean, readable YAML with your choice of indentation — instantly, in your browser.
How it works
Paste JSON on the left and the YAML equivalent is written on the right as you type — no
button to press. The converter first parses your text with the browser's own JSON parser,
so syntax mistakes are reported with the exact line and column, then serialises the result
as block-style YAML: nested objects become indented mappings, arrays become
- lists, and empty objects and arrays stay as {} and
[].
Strings are only quoted when YAML would otherwise misread them — so
"true", "42", "2026-08-08" and values containing a
colon keep their string type, while ordinary words stay unquoted and readable.
Multi-line strings are emitted as | block scalars instead of one long escaped
line. Choose 2- or 4-space indentation, optionally sort keys alphabetically or prepend the
--- document marker, then copy the result or download it as a
.yaml file. Everything runs in JavaScript on your device: your JSON is never
uploaded, which matters when it holds API responses, tokens or config secrets.
Frequently asked questions
How do I convert JSON to YAML?
Paste your JSON into the left box. It is parsed and re-serialised as YAML in the right box as you type — no button to press. Pick 2- or 4-space indentation, optionally sort keys alphabetically or add the --- document marker, then copy the YAML or download it as a .yaml file.
Is JSON valid YAML?
Almost. YAML 1.2 is a superset of JSON, so most JSON documents parse as YAML — but the flow style JSON uses is unreadable as configuration, and older YAML 1.1 parsers trip over some JSON. This converter emits block-style YAML instead, and quotes any string that YAML would otherwise reinterpret, such as "true", "42", "y" or "2026-08-08".
Is my JSON uploaded to a server?
No. The parsing and YAML generation both run in JavaScript on your own device, so nothing is sent anywhere, stored or logged. That makes it safe for API responses, Kubernetes manifests and config files containing tokens or secrets — and it works offline once the page has loaded.