Full YAML 1.2 is a big spec — flow-style {a: 1} / [1, 2, 3]
collections, anchors and aliases, multi-document streams, multi-line
block scalars. Plenty of “YAML to JSON” scripts quietly attempt all of
it and just as quietly get the edge cases wrong. Our new
YAML to JSON Converter doesn’t try to
be everything — it handles the block-style subset that covers the
overwhelming majority of hand-written config, and says so clearly when
it can’t.
- Block-style mappings and lists — nested
key: valuemappings and--prefixed lists, whether a list sits indented under its key or at the same indent (both are valid YAML), parse correctly. - Scalars that behave like YAML expects — plain, single-, and
double-quoted strings, integers, floats,
true/false, andnull/~all convert the way you’d expect; a quoted"00100"stays a string while an unquoted30becomes a number. - Comments, handled properly — full-line and end-of-line
#comments are stripped, but a#inside a quoted string is left alone. - Honest about its limits — flow-style syntax, anchors/aliases, multi-document files, and block scalars are explicitly out of scope. Paste one in and you get a clear error naming the line and the feature, never a silently broken conversion.
- Private by default — parsing happens with a small hand-written parser, entirely in your browser; nothing you paste is ever sent to a server.
Paste in a Kubernetes manifest, a docker-compose.yml, a GitHub
Actions workflow, or any other block-style YAML config, and get back
JSON you can trust — or a clear explanation of what to rewrite first.