Skip to main content

YAML ↔ JSON

Parse YAML to JSON or convert JSON back to YAML. Backed by the battle-tested yaml library, so anchors, aliases, multi-line strings, and comments are handled correctly. Choose pretty-printed or compact JSON output.

Features

Frequently Asked Questions

Which YAML features are supported?
Full YAML 1.2 syntax including anchors (&foo), aliases (*foo), multi-line strings (| and >), flow and block collections, and type tags. Comments in YAML are discarded when converting to JSON because JSON has no comment syntax.
Is the conversion lossless?
Round-tripping data (not formatting) is lossless for standard types — strings, numbers, booleans, nulls, arrays, and objects. YAML-specific features like comments and anchors don't survive the JSON trip since JSON lacks those concepts.
Pretty vs compact JSON — which should I pick?
Pretty (2-space indent) is best for reading and diffing. Compact is best for transport or embedding in URLs and smaller payloads.