Text Tools
YAML Diff Checker
Two YAML documents side by side with syntax highlighting, so an indentation change reads as a structural change rather than as moved whitespace.
In short
Compare two YAML files side by side with YAML syntax highlighting — ideal for Kubernetes manifests, CI pipelines and Helm values. Free and fully private.
By NaveenKumar T · Updated
Learn: YAML Anchors, Aliases and Merge Keys Explained (With Real Config Examples)
- YAML syntax highlighting in both panes
- Aligned side-by-side comparison
- Inline highlighting of changed values
Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →
Learn more
Why YAML needs its own diff view
YAML is whitespace-significant, which means its most consequential changes are also its least visible ones. Moving a key two spaces to the left reparents it — a `resources` block that belonged to a container now belongs to the pod spec, and the manifest is either rejected or, worse, accepted with the limits silently dropped. In a plain text diff that change is a line whose leading whitespace differs. With YAML highlighting it is a key that has visibly changed nesting level relative to its neighbours, which is a thing you can actually see.
The same applies to the quieter YAML traps. An unquoted value that changed from `yes` to `true` is a no-op to the parser but looks like a change; an unquoted `NO` in a country-code field is the boolean `false` and looks like a country code; a version number written as `1.10` is a float that will serialize back as `1.1`. Highlighting separates the key from the value and the value from its quoting, so a change of quoting style — the thing that usually caused the surprise — stands out from a change of content.
This is otherwise the same comparison as the plain Text Diff: the two documents are aligned so matching lines fall away, added lines are marked on the right, removed lines on the left, and within a modified line the specific characters that differ are highlighted. Both panes stay editable, so you can fix the indentation on the spot and watch the difference resolve.
The YAML comparisons that come up in practice
Environment drift leads. Two copies of a Kubernetes manifest — staging and production, or last week's and this week's — where one works and one does not, and the answer is a replica count, an image tag, a resource limit or an environment variable. The same question in a `docker-compose.yml`, a Helm values file, or an Ansible playbook has the same shape and the same answer.
CI pipeline debugging is second. A GitHub Actions workflow that runs on one repository and fails on another, or a `.gitlab-ci.yml` that stopped working after a merge. Pipeline files accumulate small differences — a runner label, a cache key, a `needs` list, an `if` condition — and a diff finds them faster than reading two hundred lines of YAML twice. The same goes for comparing a workflow against the vendor's documented example.
Then there is upgrade review. A new version of a chart or an operator ships a new default values file, and you need to know what changed before you adopt it: which keys were added, which were renamed, which defaults moved. Diffing the old and new files answers that in a way the release notes usually do not. Comparing a rendered template against a live object serves the same purpose in the other direction — see what the cluster actually holds versus what you think you deployed.
One caveat worth internalizing: this is a textual comparison, so it reports differences in formatting as faithfully as differences in meaning. Two manifests that are semantically identical but written with different key ordering, different quoting, or anchors expanded in one and not the other will show up as different. When the question is 'is the resulting configuration the same?' rather than 'is the file the same?', convert both sides with YAML to JSON and compare the data instead — or run both through the YAML Formatter first to normalize the presentation, which resolves anchors and re-serializes at a consistent indent.
YAML differences that are not what they look like
A handful of YAML behaviours produce diffs that mislead on first reading. Knowing them saves the ten minutes you would otherwise spend chasing a change that is not there — or, worse, dismissing one that is.
| What the diff shows | What it usually means | What to do |
|---|---|---|
| Leading whitespace changed on a key | The key was reparented — a real structural change | Read the surrounding nesting, not the line |
| `yes` became `true`, `off` became `false` | Equivalent booleans under YAML 1.1 rules | Harmless, but quote the value if a string was intended |
| A quoted value became unquoted | `NO`, `ON`, `1.10` change type when unquoted | Restore the quotes; this one bites |
| An anchor disappeared and its block appeared | Anchors expanded by a formatter or renderer | Compare the resolved form on both sides |
| A block scalar's `|` became `>` | Newline handling changed inside the value | A real change — the value's content differs |
| Only comments differ | Comments are not parsed, so nothing functional changed | Safe to ignore for behaviour, not for review |
Help
Frequently asked questions
Everything you need to know about the YAML Diff.
01How is this different from the plain Text Diff?
Only the syntax highlighting, and that turns out to matter a great deal for YAML. With keys, values, anchors and comments coloured differently, an indentation change looks like the structural change it is — a key moving under a different parent — instead of like a run of shifted spaces. Everything else, including the alignment algorithm and the inline change highlighting, is identical to [Text Diff](/text-diff).
02Does it compare the parsed data or the raw text?
The raw text, line by line. That is deliberate: for YAML you usually want to see the file as it will be committed and reviewed, including comments, quoting style and ordering, none of which survive a parse. If you would rather compare the underlying data — where key order and formatting are irrelevant — convert both sides with [YAML to JSON](/yaml-to-json), sort the keys, and use [JSON Compare](/json-compare).
03Why do my two manifests differ everywhere when they look the same?
Almost always whitespace or line endings. A file saved with CRLF endings differs from an otherwise identical LF file on every single line, and a tab where the other file has spaces does the same. YAML forbids tabs for indentation, so a stray tab is worth finding anyway. Normalizing both sides first — trimming trailing whitespace, converting line endings — turns a hundred-line diff into the two-line one you were looking for.
04Can I compare a Helm template against its rendered output?
Yes, and it is one of the better uses for this page: paste `helm template` output on one side and the manifest actually applied to the cluster (`kubectl get -o yaml`) on the other. Expect noise from the fields the API server adds — `metadata.uid`, `resourceVersion`, `creationTimestamp`, `status` — which are not differences you introduced; read past them to the spec.
05Is anything uploaded?
No. The comparison runs entirely in your browser tab, which is the point for this content: manifests and values files routinely carry internal hostnames, image registry paths, service account names and occasionally a secret that should not have been committed. Nothing is transmitted, stored or logged, and the page works offline once loaded.
Keep working
Related tools
Text Diff
Text Tools
XML Diff
Text Tools
YAML Formatter
Normalize any YAML to clean, consistent style — uniform indentation, canonical quoting, validation built in.
JSON Compare
Side-by-side JSON diffing with VS Code's engine — highlighted changes, editable panes, and key-order-insensitive comparison.
String Utility
Text Tools
Markdown to HTML
Text Tools
Learn the format
Related guides
YAML Anchors, Aliases and Merge Keys Explained (With Real Config Examples)
How &anchor, *alias and the <<: merge key work in YAML, where docker-compose, GitLab CI and Helm use them, the override order, and the errors they cause.
7 min readGuide · Data FormatsJSON vs YAML: Which Format When?
JSON vs YAML compared honestly: syntax, comments, whitespace pitfalls, tooling, and performance — with clear rules for when each format wins.
2 min readTutorial · Data FormatsYAML Tutorial: Read and Write It Without Fear
Learn YAML properly: mappings, lists, multi-line strings, anchors — and the indentation and typing pitfalls that break Kubernetes and CI configs.
2 min read