YAML Diff — Structural Compare of Two YAML Documents
Compare two YAML documents structurally by parsing both first. Ignores irrelevant format differences (quote style, comments, indentation) — you see only what actually changed. Handles multi-document YAML. 100% local.
Last updated:
Comments| Change | Path | Left | Right |
|---|---|---|---|
| Changed | $.replicas | 2 | 3 |
| Changed | $.image | "web-app:1.4.2" | "web-app:1.5.0" |
| Changed | $.env.LOG_LEVEL | "info" | "debug" |
| Added | $.env.FEATURE_FLAG_X | — | true |
| Added | $.ports[1] | — | 9090 |
Frequently Asked Questions
How is a YAML diff different from a git diff?
git diff is line-based, so re-indenting or reordering keys shows as a large change even when the data is identical. This tool parses both sides as YAML first and compares them structurally — so 'name: web-app' followed by 'replicas: 2' vs the reverse order counts as unchanged, and a real data change (replicas 2 → 3) shows up as one clean entry.
Does it support multi-document YAML (--- separators)?
Yes. Both sides are parsed with js-yaml's loadAll. Multiple documents become an array on that side, so the diff will show per-document differences. Single-document files stay as scalar values / maps for a cleaner path.
What about YAML anchors and aliases?
js-yaml resolves anchors and aliases before we compare, so &name / *name references are diffed as their expanded values. That means the same data expressed with or without anchors will compare as identical.
Try Next
JSON → TypeScript
Convert JSON to TypeScript interfaces instantly. Generate strongly-typed TS types from any JSON sample.
Related Tools
JSON → Go
Convert JSON to Go structs online. Generates idiomatic Go structs with proper json tags and PascalCase field names.
JSON → YAML
Convert JSON to YAML online. Preserve structure, comments-free, and ready to paste into Kubernetes or CI configs.
YAML → JSON
Convert YAML documents to JSON online. Supports YAML 1.2, multi-document streams, and produces pretty-printed JSON output.
JSON → CSV
Convert an array of JSON objects to CSV online. Headers are inferred automatically from all keys across records.
CSV → JSON
Convert CSV data to a JSON array of objects online. Auto-detects delimiter and quotes, preserves numeric types when requested.
Number Base
Convert numbers between binary, octal, decimal, and hexadecimal. Supports arbitrarily large integers using BigInt.