Online tool · No install
JSON ⇄ YAML Converter
Paste either side, pick a direction, hit convert. Parsing and dumping run through js-yaml — the most-used YAML library in Node and the browser, reading the same spec as many toolchains.
How it works
Pick a direction, paste into Input, press Convert. JSON→YAML emits indented block YAML; YAML→JSON emits two-space, readable JSON. On a parse error the output shows the message with line/column.
JSON vs YAML
YAML is a superset of JSON: valid JSON is valid YAML. But YAML→JSON drops comments, anchors and multi-document markers and may reorder keys; on JSON→YAML, js-yaml decides per value whether to quote a string. Keep comments on the YAML side.
FAQ
Do you support multiple documents (---)?
The converter handles a single document. For multi-document YAML use loadAll in a local script; this page covers the common single-document case.
Why are some strings quoted?
js-yaml quotes strings that could otherwise parse as numbers, booleans, dates or contain special characters, for round-trip safety — it is not an error.
Will large files lag?
It is pure browser parsing: tens of KB are instant; multi-MB input gets noticeably slow, so split it.