JSON ↔ YAML Converter
Convert JSON to YAML and YAML to JSON online for free, both directions with clear error messages. Dependency-free, runs locally in your browser — nothing is uploaded.
YAML parsing is a dependency-free, hand-written subset parser: nested maps and lists, quoted strings, block scalars (| and >), flow collections and comments. Anchors, tags, aliases and multi-line plain scalars are not supported — the parser says so instead of guessing.
How to use JSON to YAML Converter
- Paste JSON or YAML into the left box (the sample is JSON — try it as-is).
- Click JSON → YAML or YAML → JSON. Errors name the exact line that failed.
- Copy the result, download it, or hit Swap to convert it straight back.
Config files live in both worlds: APIs speak JSON, Kubernetes and CI speak YAML. This converter goes both ways without a server round-trip — the YAML side is a small hand-written parser with no dependencies, so your secrets never leave the page. It covers the YAML people actually write: nested maps and lists, quoted strings, block scalars and flow collections, with honest errors for the exotic bits it does not support.
More tools on Dev Toolbox
FAQ
Why did my YAML fail with a line number?
The parser reports the first line it cannot understand — usually a tab used for indentation, a missing space after a colon, or an anchor/alias, which this subset parser does not support. Fix that line and try again.
Does YAML → JSON → YAML round-trip exactly?
Almost: values survive, but comments, quoting style and key order choices are not preserved, and a YAML document with anchors is rejected rather than silently mangled.
Is my config uploaded anywhere?
No — both directions run entirely in your browser. Paste production secrets here as safely as into your own editor.