DataToolsLab
YAML Tools

YAML Diff

Structurally compare two YAML documents and highlight differences.

Loading tool…

What is YAML Diff?

The YAML Diff tool compares two YAML documents structurally. It parses both with js-yaml, then diffs the resulting objects — re-ordered keys, whitespace, and indentation differences are not flagged, only real value changes.

How it works

Each YAML document is parsed into a plain object via js-yaml. We run the same structural diff engine used by the JSON Diff tool, then display added/removed/changed entries with their paths.

  1. Paste both documents. Paste the 'before' and 'after' YAML in separate panes.
  2. Choose view. Toggle unified or side-by-side diff. Optionally ignore array order.
  3. Review changes. Each semantic difference is listed with its path and old/new values.

Examples

Config drift

Diff two Kubernetes Deployment manifests to see exactly which fields changed between versions.

Common mistakes

Expecting text diff

This is a structural diff. Whitespace and key reordering won't be flagged — only value changes matter.

Alternatives

JSON Diff

If your data is JSON or you prefer JSON output, use the JSON Diff tool.

Frequently asked questions

Does it handle multi-document YAML?

Currently diffs single-document YAML. Multi-document support is on the roadmap.

Online