How to compare JSON
- Paste the original JSON on the left and the changed version on the right.
- Press Compare. After that, the result updates as you edit either side.
- Each row shows one difference: Added (only in the changed JSON), Removed (only in the original), or Changed (a different value or type), with its path and both values.
- Use Copy to copy the list as text, for example to paste into a bug report or code review.
Where it helps
- Checking what changed between two API responses, or between staging and production.
- Reviewing changes to configuration files such as
package.jsonor app settings. - Debugging tests that compare JSON snapshots.
- Comparing exports from two systems that format JSON differently.
How the comparison works
- Objects are compared by key, so the order of properties never matters.
- Arrays are aligned using the same algorithm as the Text Diff Checker, so inserting one item is reported as a single addition rather than shifting every item after it. Modified items are compared in detail.
- Types matter:
1and"1"are different, as arenulland a missing key.
Limitations
- Both sides must be valid JSON. Errors show the line and column, just like the JSON Formatter.
- Numbers are compared after parsing, so
1.0and1are equal, and very large integers may lose precision. - Up to 1,000 differences are listed.
Frequently asked questions
How is this different from a text diff?
A text diff compares lines, so reformatting, re-indenting or reordering keys makes every line look different. JSON Diff parses both documents first and compares the data itself. {"a":1,"b":2} and a pretty-printed {"b": 2, "a": 1} are reported as identical, and a real change is reported once, at its exact path.
What does the path mean?
Paths use JSONPath-style notation. $ is the whole document, .name is a property and [2] is the third item of an array (counting from zero). So $.users[2].email is the email of the third user. Removed items use their position in the original; added and changed items use their position in the changed document.
When should I ignore array order?
When an array is really a set, such as a list of tags or permissions, its order usually does not matter. Ticking Ignore array order treats ["a", "b"] and ["b", "a"] as equal. Leave it unticked for arrays where order is meaningful, such as steps or sorted results.
