About JSON Diff
JSON Diff compares two JSON documents by structure, not by text. Reformatting, different indentation or a different key order never show up as changes. Only real data differences do:
- Added fields and array items (green), removed ones (red) and changed values (amber) are highlighted in both editors.
- The change list shows every difference with its path (
$.users[2].email) and the old and new value. Click a row to jump to it. - Numbers are compared by value, so
1.0equals1, while9007199254740993and9007199254740992are correctly reported as different.
Comparing arrays
Arrays are the tricky part of any JSON diff, so you choose how they are matched:
- Smart (default) finds the longest common sequence, so inserting one item reports one addition instead of shifting every later item.
- By position compares item 1 with item 1, item 2 with item 2, and so on.
- Ignore order treats arrays as sets, which is useful for tags or permission lists.
- Match by key pairs objects by a field such as
id, so a reordered list of users is compared user by user.
JSON Patch
Copy JSON Patch gives you an RFC 6902 patch that turns the original document into the modified one. You can apply it with any JSON Patch library.
Is my data safe?
Yes. Both documents are compared entirely in your browser. Nothing is uploaded.