JSON Diff Checker
Compare two JSON documents and see exactly what was added, removed, and changed, by path. Paste or upload both sides, and copy or download the differences — all in your browser.
100% Client-Side Processing
Both JSON documents are compared entirely in your browser. Nothing is uploaded to a server.
No differences found — both JSON documents are equivalent.
Table of Contents
What is a JSON Diff Checker?
A JSON diff checker compares two JSON documents — an "original" and a "modified" version — and reports the exact differences between them: which keys or array items were added, which were removed, and which values changed, identified by their path inside the document (like user.address.city or items[2]).
Unlike a plain text diff, which compares line by line and gets confused by re-indented or re-ordered JSON, a structural JSON diff parses both documents and compares their actual data, so formatting differences never produce false positives and every reported change is a real difference in the data.
How it Works
- Add both documents: paste JSON A (the original) and JSON B (the modified version) directly, or upload a .json file for either side.
- Choose your options: turn on "Ignore array order" if array elements might be reordered without that counting as a real change.
- Read the result instantly: the tool parses and compares both documents in your browser as you type, listing every added, removed, and changed value by path, with live counts for each category.
- Copy or download: copy the diff as JSON to your clipboard or download it as a diff.json file.
Features
- Paste JSON directly or upload a .json file for either side
- Instant, live comparison as you type — no button to click
- Structural comparison, not line-based — indentation and key order never cause false differences
- Every change reported with its exact path (e.g. user.address.city or items[2].name)
- Distinguishes added, removed, and changed values with color-coded results
- Optional "Ignore array order" mode for arrays that don't have a meaningful order
- One-click swap between JSON A and JSON B
- Live counts of added, removed, and changed values
- Copy the diff as JSON or download it as a file
- 100% client-side processing for privacy
Best Practices
- Put the "before" version in JSON A and the "after" version in JSON B: this tool reports removed values as things present in A but missing in B, and added values as the reverse — keeping the order consistent makes the diff easier to read.
- Turn on "Ignore array order" for unordered collections: if an array represents a set of tags, IDs, or items where order doesn't carry meaning, enabling this avoids reporting a reordered array as a wall of unrelated changes.
- Use the Swap button to check a diff in both directions: useful when you're not sure which document is the "original" — swapping just flips which side each addition/removal is reported from.
- Remember paths use dot notation for objects and brackets for arrays: a path like orders[3].items[0].sku means the 4th order's 1st item's sku field — read paths left to right, following each key and index in order.
- Compare individual records rather than huge combined exports when possible: a diff of one user object is much easier to review than a diff of an entire database dump — narrow the comparison to what you actually need to check.
Troubleshooting
It says JSON A or JSON B isn't valid
Check for a trailing comma after the last item in an array or object, unquoted keys, single quotes instead of double quotes, or an unclosed bracket in whichever side is flagged — these are the most common reasons JSON fails to parse.
An array shows as completely different even though it has the same items
By default, arrays are compared position by position, so the same items in a different order are reported as changes at every position. Turn on "Ignore array order" if the array's order doesn't matter for your comparison.
A value shows as "changed" even though it looks the same
This usually means the types differ even though the printed values look similar — for example the number 5 versus the string "5", or true versus the string "true". JSON diff checkers compare by type as well as value.
The diff list is very long and hard to scan
Very large or deeply nested documents can produce a long flat list of changes. Narrow your comparison to a smaller sub-document (e.g. one record instead of a full array of records) if you only need to check a specific area.
Common Use Cases
- Reviewing API response changes: compare a response before and after a backend change to confirm only the intended fields were affected.
- Auditing configuration file changes: compare two versions of a JSON config file to see exactly which settings changed between deployments.
- Debugging why two "identical-looking" payloads behave differently: catch subtle differences like a string versus a number, or a missing key, that are easy to miss by eye.
- Verifying data migration or transformation scripts: compare the input and output of a transformation to confirm it changed exactly the fields it was supposed to.
- Comparing test fixtures or snapshot test output: quickly see what changed between an expected and actual JSON snapshot when a test fails.
Frequently Asked Questions
A text diff compares line by line, so re-indenting or reordering keys in otherwise-identical JSON produces a huge, noisy diff. This tool parses both documents and compares the actual data structure, so only real value differences are reported, regardless of formatting.
The path shows exactly where in the document the difference is, using dot notation for object keys and bracket notation for array indexes — for example user.address.city or tags[2]. An empty path means the difference is at the very top level of the document.
By default, array items are compared by their position (index), so moving an item changes what's at every position from that point on. Turn on "Ignore array order" if the array represents an unordered collection.
Yes. A value changing from a string to a number, from an object to an array, or from null to a real value is reported as a "changed" difference, the same as a plain value change.
Yes, arrays of objects are compared recursively — each object at each array position is compared field by field, so you'll see exactly which fields changed within which array item.
No. Everything happens locally in your browser, and neither document is uploaded or saved.
The comparison runs in your browser's memory, so very large JSON documents (tens of megabytes or more, or deeply nested structures) may be slow or use a lot of memory depending on your device.