JSON to YAML
Paste JSON, get YAML. Pick block style (readable, default) or flow style (compact, JSON-like). Key order is preserved. The reverse direction is at YAML → JSON. Same code as the round-tripper — use the Swap on either page to flip direction.
Paste JSON.
How to convert JSON to YAML
- Paste in either panel — the tool auto-detects direction.
- Output appears in the opposite panel live. The Swap button flips them, useful for round-tripping.
- YAML output options: Block style (default — readable), Flow style (compact, JSON-like), Quote style (auto / single / double).
- Copy or Download as
.yaml/.yml/.json.
Block vs flow style
- Block — indentation-based, like Python. Best for human editing of config files.
- Flow —
{a: 1, b: 2}inline; identical to JSON syntax for objects and arrays. Best when the YAML is generated and then re-parsed.
FAQ
What is the "Norway problem"?
YAML 1.1 parses bare NO, FALSE, OFF as booleans. The string "Norway"'s ISO 3166 code NO becomes false. The tool quotes such tokens automatically. YAML 1.2 fixed this — use a 1.2 parser downstream.
Does YAML support all JSON values?
Mostly — YAML 1.2 is a strict superset of JSON. Edge cases: very large integers may not round-trip exactly through every YAML parser.
Will it work offline?
Yes — uses js-yaml, cached after first load.