DevTool Desk

YAML ↔ JSON Converter

YAML
JSON

Convert YAML to JSON and JSON to YAML online. Edit either side and the other updates instantly: paste YAML (or YML) on the left to see its JSON equivalent, or paste JSON on the right to see it as YAML. Both panes stay editable, so you can round-trip between config file formats without leaving the page. It doubles as a YAML validator, since invalid input is flagged with the exact line and column of the problem.

Frequently asked questions

Are comments preserved when converting?

Comments in the YAML pane stay exactly as you typed them, since editing that side never overwrites it. But JSON has no concept of comments, so any comments are necessarily dropped from the JSON output, and converting from JSON back to YAML can't restore comments that never existed there.

What YAML features are supported?

This uses a standard YAML 1.2 parser, so anchors, multi-document markers, flow and block styles, and typed scalars (dates, numbers, booleans) are all handled.

How do I convert YAML to JSON?

Paste your YAML into the left pane and the equivalent JSON appears in the right pane straight away. Anchors, multi-line strings and typed values such as numbers and booleans are resolved in the output.

How do I convert JSON to YAML?

Paste your JSON into the right pane and the YAML version appears on the left, with indentation and quoting handled for you. Copy it from there into your config file.

Can I use this as a YAML validator?

Yes. Whenever the YAML doesn't parse, the tool shows the error with its line and column, which makes indentation mistakes, stray tabs and missing colons quick to find. Files ending in .yml and .yaml use the same syntax.