JSON ↔ YAML Converter
Convert JSON to YAML and back with a proper parser on both sides.
Loading tool…
How to use it
- Paste JSON and press "JSON → YAML", or paste YAML and press "YAML → JSON".
- Both directions use real parsers (no regex tricks), so nested structures and special values convert correctly.
- YAML errors are reported with line and column numbers.
- Note that YAML comments are dropped during conversion — neither direction can preserve them.
About this tool
Parses both formats with dedicated parsers rather than regex tricks, so comments-stripped YAML, nested structures and special values convert correctly. Conversion errors are reported with line numbers, and the output preserves key order where the format allows.
Your input never leaves the browser: this tool works entirely offline once the page has loaded.
Frequently asked questions
Are YAML comments preserved?
No — comments are not representable in JSON, so they are dropped when parsing YAML. Both directions lose them on a round trip.
How are ambiguous values like "42" handled?
Quoted values stay strings and unquoted ones become numbers or booleans, following the YAML specification. The round trip preserves that distinction.