JSON ↔ YAML

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

Runs locally in your browser
Output No signup · local processing

Paste JSON or YAML to convert between them

Paste on the left and click Convert. Choose a direction or let it auto-detect — the input is validated first, then converted, all in your browser.

Runs entirely in your browser

Convert between JSON and YAML, locally

Paste JSON or YAML and this tool converts it to the other format. Choose the direction, or let it auto-detect which you pasted. The input is parsed and validated first, so a syntax error is reported clearly instead of producing broken output, and the result is pretty-printed and ready to copy or download. Both formats describe the same data, so a round trip preserves your structure. Everything runs in your browser — nothing is uploaded to any server.

Common questions

Which direction does it convert?

Both. Pick JSON → YAML or YAML → JSON, or leave it on Auto-detect and the tool decides from the input — content that parses as JSON is treated as JSON, otherwise it is parsed as YAML (which is a superset of JSON).

Is any data lost in conversion?

The data structure is preserved both ways. Comments are not — YAML comments are dropped when the document is parsed, since neither JSON nor the parser retains them.

What happens with invalid input?

The input is validated before conversion. If it cannot be parsed, the tool shows the parser's error message instead of emitting broken output.

How are YAML anchors and aliases handled?

They are resolved into concrete values during parsing, so the JSON or reformatted YAML contains the expanded data rather than the anchor references.

Is my data uploaded anywhere?

No. Parsing and conversion happen entirely in your browser tab using the js-yaml library and the built-in JSON engine. Nothing is sent to a server.