Comparing structure, not indentation
YAML is a format where the same data can be written many ways: keys in a different order, a sequence in block style or flow style, a value quoted or bare. A line-based diff reports all of that as change. This tool parses both files and compares the resulting data, so reordered mapping keys produce no differences at all, and inserting one item into a sequence is reported as one addition rather than making every later item look modified.
Type awareness: the bug this tool is for
YAML resolves unquoted scalars to types, and that is where configuration
bugs hide. version: 1.10 is the number 1.1 — the trailing
zero is gone, because numerically 1.10 and 1.1 are the same value. Write
version: "1.10" and it is the string "1.10". Those are different
values with different behavior downstream, and this diff reports the change
from one to the other explicitly. The same trap catches port numbers, version
pins, and anything that looks numeric but is meant as a label.
This parser follows the YAML 1.2 core schema, which means
yes, no, on, and off are
plain strings. Under the older YAML 1.1 rules they were booleans — the
famous "Norway problem", where the country code NO silently became
false. Modern parsers use 1.2; if your tooling is older, be aware
its interpretation may differ from what you see here.
What this parser supports
It covers the YAML that configuration files actually use: block mappings and
sequences at any nesting depth, flow collections
([1, 2], {a: 1}), quoted and plain scalars, literal
(|) and folded (>) block text with chomping
indicators, comments, and a leading document marker.
Deliberately not supported: anchors and aliases
(&name, *name), explicit tags
(!!str), directives, multiple documents in one file, and tabs for
indentation (which YAML itself forbids). Rather than guessing at these and
producing a subtly wrong comparison, the parser stops and tells you which
feature it hit and on which line. A diff you cannot trust is worse than no
diff.
Nothing leaves your browser
YAML files are where secrets live: deployment manifests, CI pipelines with tokens, service configuration. Both files are parsed and compared locally, nothing is uploaded, and nothing is written to the URL.
Related tools: the JSON diff shares the same comparison engine, and the XML, CSV, and text diff tools cover the other formats.