YAML ⇄ JSON Converter

Convert between YAML and JSON both ways, instantly and privately in your browser.

// Output appears here…

YAML and JSON

YAML and JSON are two ways to represent the same structured data. YAML is popular for config files (Docker Compose, Kubernetes, CI); JSON is the lingua franca of APIs. This converter parses one and serializes the other, entirely client-side.

Frequently asked questions

Does it convert both directions?

Yes. It converts YAML to JSON and JSON to YAML, so you can move config between the two formats — for example turning a Kubernetes or CI YAML file into JSON, or vice versa.

Are comments preserved?

No. YAML comments have no equivalent in JSON, so they are dropped during conversion. Data — keys, values, nesting and lists — is preserved faithfully.

Why does my YAML fail to parse?

YAML is indentation-sensitive: mixing tabs and spaces, inconsistent indentation, or an unquoted value containing a colon are the usual culprits. The converter reports the parse error so you can locate it.