JSON Diff: Compare JSON Objects
Paste two JSON documents to see exactly what changed. Every difference is listed by path, like $.users[2].email, and formatting or key order never cause false alarms.
Runs in your browserNo sign-upNothing uploaded
Changed paths
| Change | Path | Old value | New value |
|---|
How to use the JSON Diff
- Paste the original JSON on the left and the modified JSON on the right, or open two files.
- Syntax errors are shown under each box with the line and column, so you can fix them quickly.
- Read the Changed paths table: each row shows whether a value was added, removed or changed, with old and new values.
- Tick Ignore array order when lists are sets, for example tags or permissions.
- Scroll to the side-by-side view to see the changes in context, or copy the change list as JSON.
Why a structural JSON diff beats a text diff
A plain text diff compares characters and lines, so two JSON files that hold the same data can look completely different if one is minified, indented differently or has keys in another order. This tool parses both documents first and compares the data: objects are compared key by key regardless of order, and numbers, strings, booleans and null are compared by value. Only real changes are reported.
How changes are reported
Each difference gets a JSONPath-style location, such as $.owner.email or $.items[3].price, and one of three types:
- added: the key or array element exists only in the modified JSON.
- removed: it exists only in the original JSON.
- changed: it exists in both but the value differs, including type changes such as a string becoming a number.
Arrays are aligned with a longest-common-subsequence algorithm, so inserting one element at the start of a list is reported as a single addition instead of marking every following element as changed.
Ignoring array order
Many APIs return lists whose order carries no meaning, such as roles, tags or IDs. With Ignore array order on, arrays are compared as collections: an element only counts as added or removed if it has no equal counterpart on the other side. The side-by-side view then sorts array elements so equal lists line up.
Typical uses
Compare API responses between staging and production, check what a migration changed in a config file, review differences between two package.json or tsconfig files, and debug snapshot tests.
Frequently asked questions
Does key order matter when comparing JSON?
{"a":1,"b":2} and {"b":2,"a":1} are reported as equal. Array order does matter by default because arrays are ordered, but you can turn that off with Ignore array order.Is my JSON uploaded to a server?
What do paths like $.users[2].email mean?
$ is the root of the document, .users is a key, and [2] is the third element of an array (indexes start at 0). Keys with spaces or special characters are written in brackets, like $["first name"].Is 1 equal to 1.0?
1 and "1", are different and are reported as changed.