What This Tool Does
The JSON Diff Viewer performs a deep, structural diff between two JSON documents. Unlike a text diff (like git diff), it doesn't care about whitespace, key order, or line breaks. It walks the tree on both sides and reports differences by path: which keys are new, which are gone, and which have different values.
Every difference is reported with the full JSON path (user.address.city, orders[2].total) so you can jump straight to what changed without hunting through nested objects. Nested changes are surgical — if only one field inside a deep object is different, only that field is highlighted, not the whole parent.
When To Use It
- Debugging API responses. Same request, different responses on staging and prod? Paste both, see exactly which fields diverged.
- Config file review. Comparing two environments'
config.json, package manifests, or Terraform-emitted state. - Schema changes. When an upstream service adds or renames a field, this tool tells you what changed at the payload level.
- Test snapshot debugging. Jest / Vitest snapshot mismatches often make more sense as a JSON diff than as a raw text diff.
- Feature-flag audits. Comparing config for a flagged rollout vs. control.
How the Diff Works
The algorithm walks both trees recursively:
- If both sides are the same primitive value at the same path — unchanged.
- If the path exists only on the right — added (green).
- If the path exists only on the left — removed (red).
- If the path exists on both sides with different values — changed (amber), and the diff shows both the old and new value.
- Nested objects and arrays are diffed recursively, so you get the smallest possible highlight for any change.
Two toggles change the behavior:
- Ignore array order. By default, arrays are compared index-by-index. With this on, arrays are compared as sets —
[1,2,3]vs[3,2,1]reports zero differences. - Ignore string case. Compares strings case-insensitively (
"Alice"equals"alice"). Useful for user-input fields where casing shouldn't count.
Privacy
Everything runs in your browser. Your JSON is never sent anywhere — no API, no logging, no storage. You can verify this by opening your browser's DevTools Network tab and running a diff. Zero requests fire. This matters if you're comparing production data, PII, or anything sensitive.