How to Compare Two JSON Documents
Paste both versions
Put the original document in the JSON A box and the changed document in the JSON B box. Each side is parsed on its own, so a syntax problem in one input does not block the other. Minified and pretty-printed JSON both work, since whitespace and indentation are ignored.
Run the comparison
Click Compare. The tool parses both inputs with the browser JSON parser and walks the two structures key by key and element by element. If either side is not valid JSON, the status line shows which side failed and the exact parser message so you can fix it.
Read the diff and counts
Differences are listed by path with a leading sign: minus for removed keys, plus for added keys, and a tilde with the old value, an arrow, and the new value for changed values. The legend and the summary line report how many entries were unchanged, modified, removed, and added.
What Each Change Type Means
Every leaf in the two documents is sorted into one of four states. The tool walks objects and arrays recursively, so the same rules apply at any nesting depth. The path for each entry uses dot notation for object keys and square brackets for array positions, for example user.roles[2].
| Change type | Marker | What triggers it | Shown value |
|---|---|---|---|
| Added | plus sign | A key or array element exists in JSON B but not in JSON A | The new value |
| Removed | minus sign | A key or array element exists in JSON A but not in JSON B | The old value |
| Modified | tilde | Same path, different value, or a different data type | Old value, then new value |
| Unchanged | none | Same path and identical value on both sides | The shared value |
| Type shift | tilde | One side is an object or array and the other is not | Counted as modified at that path |
| Array length | plus or minus | One array is longer than the other | Extra elements added or removed by index |
When This Tool Fits Your Task
Reviewing config changes
Paste the old and new versions of a settings file to see exactly which keys were added, dropped, or retuned before you ship them. Object key order does not affect the result, so reformatted files still compare cleanly.
Checking API responses
Drop two captured responses side by side to spot a renamed field, a removed property, or a value that changed type from a number to a string. The path notation points you straight to the affected location.
Comparing ordered lists
Good for arrays where position is meaningful, since elements are matched by index. If two arrays hold the same items in a different order, expect them to show as changes rather than as a match.
Quick local checks
The comparison runs in your browser with no upload and no sign-up, so it suits a fast structural check. For very large documents or commit-level history tracking, a dedicated diff in your editor or version control may serve better.
Common Problems and Fixes
One side reports invalid JSON
The status line names the failing side and shows the parser message. Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or a stray comment. Fix the reported spot and compare again.
Reordered arrays show as differences
Arrays are compared by position, not by content. The same elements in a different order are reported as changes. Sort both arrays the same way before pasting if order is not meaningful for your data.
A value shows as modified but looks the same
Check the data type. The number 5 and the string 5 occupy the same path but differ in type, so they are flagged as a change. Quotes in the old and new values reveal which one is a string.
Nothing happens after pasting
The comparison runs when you click Compare, not on paste. If both boxes are empty the output stays blank. Confirm there is content on at least one side, then click the button.