YAML to JSON Converter

Convert YAML to JSON and back, both directions, in-browser.

GenerateMake a QR codeQR codes for links, Wi-Fi, and contacts — no watermark, no sign-up.Create

Waiting for input…

A hand-rolled converter for the common YAML you meet day to day: nested maps, lists of scalars, and lists of maps, with strings, numbers, booleans, and null. It is deliberately small, so advanced YAML — anchors, multi-line block scalars, flow style, and multiple documents — is out of scope. For those, reach for a full YAML library.

How to convert YAML to JSON

Paste your YAML and the JSON appears below, with values typed — numbers as numbers, true/false as booleans, ~ or null as null. Comments and the document marker are ignored.

Going the other way

Flip the direction to JSON to YAML and paste JSON. Indentation marks nesting, list items get a dash, and ambiguous strings are quoted so the YAML round-trips back to the same data.

Questions

Which YAML features are supported?
The everyday subset: nested maps, lists of scalars, and lists of maps, with strings, numbers, booleans, and null. It deliberately skips advanced YAML — anchors, multi-line block scalars, flow style, and multi-document files.
Does it convert JSON to YAML too?
Yes, both directions. Switch the toggle to JSON to YAML and paste valid JSON; the tool emits indented YAML, quoting any string that would otherwise be read as a number, boolean, or null.