About this YAML comparison
YAML holds the configuration for Kubernetes, Docker Compose, GitHub Actions, Ansible and many apps. Because indentation defines the structure, a small edit can change meaning, so it pays to compare two versions before you deploy.
A YAML diff shows changed keys and values, and items added to or removed from lists.
What changed in this sample
- The name, age, address and phone numbers all changed.
- The email followed the new name and
activeflipped from true to false. - The
adminrole was removed from the list. - The
newsletterandnotificationspreferences swapped values.
Tips for comparing YAML
- Keep indentation visible
- In YAML, indentation is structure. Leave Ignore whitespace off unless you know only the spacing changed.
- Compare rendered manifests
- For Helm or Kustomize, render both versions (helm template, kustomize build) and compare the output.
- Environment differences
- Compare the staging and production values files to see exactly which settings differ.
- Spot flipped flags
- Changed true/false values stand out with the word highlight inside each line.
How to compare YAML online
- Paste the older version into Original and the newer one into Changed, or open a file on each side.
- Check that the syntax menu says YAML, then pick split or unified view.
- Step through the changes with the arrows or Alt ↓, and use Settings for options such as ignoring blank lines.
- Save the comparison in your browser, share a link, or download it as a .diff, HTML or PDF.
YAML comparison: questions
How do I compare two YAML files?
Open or paste one file into each pane. Lines with changed keys or values are highlighted, and removed list items are shown in red.
Does it understand YAML structure?
It compares line by line, which follows the structure closely as long as both files use the same indentation.
Can I compare JSON with YAML?
Not meaningfully, since the formats differ. Convert one to the other first, then compare.