Compare YAML online

Two versions of a profile with new values, a removed role and flipped settings. Paste your own YAML to compare it. Tips for YAML

Original
0 lines
Drop to load into original
Changed
0 lines
Drop to load into changed
−0+0
Original
Changed

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 active flipped from true to false.
  • The admin role was removed from the list.
  • The newsletter and notifications preferences 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

  1. Paste the older version into Original and the newer one into Changed, or open a file on each side.
  2. Check that the syntax menu says YAML, then pick split or unified view.
  3. Step through the changes with the arrows or Alt ↓, and use Settings for options such as ignoring blank lines.
  4. 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.