JSON Diff – Compare JSON
Compare two JSON documents structurally: see added, removed and changed values by JSONPath, ignoring key order and formatting. Free and runs in your browser.
+ added, - removed, ~ changed. Objects are compared by key (key order is ignored), arrays by index; 1 and 1.0 count as equal.
Runs entirely in your browser. Your data is never uploaded.
Related Tools
View AllWhat is JSON Diff?
JSON Diff compares two JSON documents by structure instead of text. It lists every value that was added, removed or changed with its JSONPath, so differences in whitespace, formatting or key order are ignored.
How to use JSON Diff
- Paste the first document into Original JSON.
- Paste the second document into Modified JSON.
- Read the summary and the list of differences (it updates as you type).
- Copy the difference list with Copy.
Example
Original: {"a":1,"b":2,"arr":[1,2]}
Modified: {"a":1.0,"c":3,"arr":[1]} - $.b: 2 - $.arr[1]: 2 + $.c: 3
Summary: Added: 1 · Removed: 2 · Changed: 0. 1 and 1.0 are equal.
When to use JSON Diff
Use it to compare API responses between environments, config versions or test snapshots. For arrays whose order does not matter, or to see line-level text changes, a text diff may be more appropriate.
How JSON Diff works
Both inputs are parsed with a strict JSON parser and walked in parallel. Objects are compared key by key regardless of order; keys only in the original are removed (-), keys only in the modified document are added (+). Arrays are compared position by position, so inserting an item at the start shows every following item as changed. Scalar values of different type or value are changed (~ old → new); numbers are compared numerically, so 1 and 1.0 are equal, and big integers are compared exactly.
Common Use Cases
- Comparing API responses from staging and production
- Reviewing changes between two config versions
- Checking what changed in a test snapshot
- Verifying data migrations
Security Note
Everything runs locally in your browser; the code you paste is not uploaded.
FAQs
Does key order matter?
No, objects are compared by key.
How are arrays compared?
By index. Moving items changes the positions they are compared at.
Is 1 equal to 1.0?
Yes, numbers are compared by value.