What is JSON Diff?
JSON diff compares two JSON documents structurally rather than as plain text. It understands JSON semantics — it ignores key ordering, properly compares nested objects and arrays, and shows exactly which values changed, were added, or were removed. This gives more meaningful results than a text-based diff when comparing JSON data.
Common use cases
- Comparing API responses between environments (dev vs prod)
- Reviewing configuration changes in JSON files
- Detecting unintended changes in JSON data exports
- Comparing database document snapshots
- Validating JSON transformations and migrations
How to use
- 1Paste the original JSON on the left and the modified JSON on the right (or drop files).
- 2Read the Tree or List view: + added, − removed, ~ changed; filter, or match array items by an ID field.
- 3Press Compare (⌘↵) for a summary, then copy or download the RFC 6902 JSON Patch.
Frequently asked questions
Why use JSON diff instead of text diff?
Text diff treats JSON as plain text, so reordering keys or changing indentation shows as changes. JSON diff understands the structure — {"a":1,"b":2} and {"b":2,"a":1} are considered equal because JSON objects are unordered by specification.
How does it handle arrays?
Arrays are compared positionally — element at index 0 is compared with element at index 0, etc. Added or removed elements at the end are shown as additions/deletions. Arrays are ordered in JSON, so [1,2] and [2,1] are different.