YAML ↔ JSON Converter
Convert YAML to JSON and back — block and flow collections, block scalars, anchors and aliases, with line-precise errors and every YAML-1.1-vs-1.2 ambiguous boolean flagged rather than silently guessed.
This reads YAML 1.2's Core Schema — only true/false/null
are recognised as those types. Older tools using YAML 1.1 also treat words like yes/no/on/off
as booleans (the "Norway problem" — a country code NO misread as false); this tool reads those as plain strings and flags them.
Multi-document streams, explicit tags and merge keys (<<) are not supported.
{{ error.title }}
Line {{ error.line }}
{{ error.msg }}
{{ output }}-
Line {{ w.line }}: the bare word
{{ w.token }}is read as the plain string "{{ w.token }}" here (YAML 1.2 Core Schema) — some other YAML processors (1.1) would read it as a boolean.
Both directions are converted entirely in your browser. Nothing you paste or upload is ever sent to a server.
Why this only supports a documented subset of YAML
Full YAML 1.2 is a large specification — multi-document streams, custom tags, merge keys and
non-scalar mapping keys all exist in it. This tool supports the subset that covers the overwhelming
majority of real YAML: block and flow mappings/sequences, every core scalar type, both quoting
styles, comments, block scalars (| literal and > folded, with chomping),
and anchors/aliases (&name / *name) — common enough in Kubernetes and
Docker Compose files that leaving them out would make the tool fail on real-world input constantly.
Anything outside that subset produces a specific, named error rather than a silent wrong parse.
The "Norway problem," explained
YAML 1.1 treats a long list of bare words as booleans — yes, no,
on, off, y, n, and more. This famously misread
the two-letter country code NO (Norway) as the boolean false in some
processors. YAML 1.2's Core Schema narrows this to just true/false
— this tool implements that reading, and flags every bare word that would have meant something
different under the older convention, rather than silently picking one interpretation.
Frequently asked questions
What YAML features does this support?
Block and flow mappings/sequences, all core scalar types, single- and double-quoted strings, comments, block scalars (| literal and > folded, with chomping), and anchors/aliases — the subset that covers the overwhelming majority of real config files, CI pipelines and Kubernetes manifests.
What YAML features does this NOT support?
Multi-document streams (multiple --- separators), explicit/custom tags (!!type), merge keys (<<), and non-scalar mapping keys. A file using any of these gets a specific, named error rather than a silently wrong parse.
What is the "Norway problem"?
YAML 1.1 treats many bare words as booleans — yes/no/on/off/y/n — which famously misread the country code NO as the boolean false in some processors. YAML 1.2's Core Schema, which this tool implements, narrows that to just true/false. Every such bare word is flagged in the result so you know it was read as a plain string here.
Why does this show anchors and aliases as expanded values?
JSON has no concept of a shared reference the way YAML's anchors (&name) and aliases (*name) do, so converting to JSON means dereferencing every alias into the actual value it points to — the same thing any YAML processor does when handing data to something that expects a plain tree.
Is my data uploaded anywhere?
No. Both directions are parsed and converted entirely in your browser using JavaScript. Nothing is transmitted to a server.