Skip to content
{}
YAML workbench

YAML Diff & Compare

Compare two YAML documents semantically with changed lines highlighted, merge keys resolved, and multi-document streams aligned.

Local processing

Comparison options

Comments, quote style, block vs flow formatting, and mapping key order never count as changes. Anchors and merge keys (<<: *defaults) are expanded, multi-document streams (---) are aligned per document, and 64-bit integers stay exact.

Original (YAML 1)

0 lines

Modified (YAML 2)

0 lines

Paste two YAML documents, open two files, or load the example. To check one document for syntax errors first, use the YAML validator.

How to Diff Two YAML Files

Paste or open the original YAML on the left and the modified YAML on the right. Syntax errors are highlighted with their exact line and column, and duplicate mapping keys are surfaced as warnings. When both sides parse, changed lines are highlighted directly in both editors and every difference is listed by path below so you can step through changes with Prev/Next or copy a plain-text diff report.

Semantic Rules Applied

YAML gives authors several ways to write the exact same data. This comparator normalizes syntax differences while preserving value fidelity.

InputOutputNote
a: 1, b: 2 vs b: 2, a: 1EquivalentMapping key order is ignored
'hello' vs "hello" vs helloEquivalentQuote style is ignored
<<: *defaults vs expanded keysEquivalentAnchors and merge keys resolved
id: 9007199254740993 vs ...992Changed at $.idExact BigInt comparison
a: 1\n---\nb: 2 vs b: 3Changed at Doc 2 $.bMulti-document streams supported

Common Use Cases

Compare staging and production Kubernetes manifests, review Helm values overrides, audit Docker Compose service changes, diff GitHub Actions or GitLab CI workflows, and inspect OpenAPI YAML revisions before merging.

Frequently Asked Questions

Why use a semantic YAML diff instead of git diff?

A line-based text diff flags reordered mapping keys, quote style changes ("info" vs 'info' vs info), flow vs block collections, and added comments—even when the parsed configuration is identical. A semantic YAML diff parses both files under YAML 1.2 rules and reports only values that actually changed, added, or disappeared.

Does it handle YAML anchors, aliases, and merge keys (<<: *defaults)?

Yes. Anchors and merge keys are resolved before comparison. If one file uses a <<: *defaults block and the other writes the inherited keys explicitly with the same final values, the tool recognizes them as equivalent.

Can it compare multi-document YAML files separated by ---?

Yes. Kubernetes manifests, Helm outputs, and CI templates often bundle multiple documents in one file separated by ---. Each document is aligned in order and differences are labeled Doc 1, Doc 2, and so on.

Are large 64-bit integers compared safely?

Yes. Integers are parsed as exact BigInts rather than JavaScript floating-point numbers, so two 19-digit account or snowflake IDs that differ only in the last digit are reported as changed instead of falsely matching.

Do my YAML secrets or Kubernetes configs leave my browser?

No. Everything runs locally in your browser tab. No YAML content is uploaded to a server or stored in a URL.

Validators workflow

Continue with the data, not the directory

Validate, format, repair, compare, query, and reshape payloads before they ship.

Browse inspect, validate & repair