YAML Diff

Compare two YAML files and see every added, removed and changed value, highlighted in both files with its path. Key order is ignored.

Runs in your browser. Nothing is uploaded.

How to use the YAML Diff

  1. Paste the original YAML on the left and the changed YAML on the right, or press Load example.
  2. Read the summary of added, removed and changed values. Each change is highlighted in both boxes.
  3. Open the Changes list and click a path to jump to it, or switch to Line diff to see the files side by side.
  4. Tick Ignore order of array items when list order doesn't matter, and Format YAML to tidy messy indentation.
  5. Press Copy change list to share the result.

Compare YAML as data, not text

A plain text diff of two YAML files is noisy. Move a key, change the indentation or reorder a list and every line looks different, while the one value that broke production hides in the middle. YAML Diff reads both files as data first, then compares them key by key. Formatting, key order and comments drop out, and what is left is the list of real changes, each with its path.

Changes highlighted where they are

Every change is marked inside both editors: removed values in red on the left, added values in green on the right, and changed values in amber on both sides. The Changes list underneath gives the path of each change, such as $.image.tag, with the old and new value. Click a path to jump to that line. Line diff shows both files normalised side by side when you want the full context.

Lists that change order

Configuration lists like environment variables, ports or volumes often move around without meaning anything. Tick Ignore order of array items and items are matched by their content and by fields such as name or id, so a reordered env: list reports only the variable whose value changed and the one that was added. A note shows how many order-only changes were removed.

Typical uses

Compare the values files for staging and production before a release, review what a pull request changes in a Kubernetes manifest or Compose file, or check what a generator or upgrade rewrote in your config.

Frequently asked questions

Does key order or indentation count as a difference?

No. Both files are read as data, so a before b and b before a are the same, and two spaces or four make no difference. Only real changes to keys and values are reported.

Are comments compared?

No. Comments aren't part of the data, so adding or editing one is not a change. Use a plain text diff if you need to review comment changes.

What does Ignore order of array items do?

Lists are normally compared position by position. With the option on, identical items are matched wherever they are, and records are paired by a field like name or id, so a reordered env: list only reports what really changed.

Can I compare files with several documents?

Yes. A file with several --- documents is compared document by document, with paths such as $[1].spec.replicas.

Is my YAML uploaded?

No. The comparison runs in your browser, so config files with hostnames and secrets stay on your device.

Tutorials