Skip to content
SDETRole
SDETRole

JSON & Data

JSON Diff Checker

Compare two JSON documents semantically, with a path for every change.

Runs entirely in your browser No sign-up

Original (expected)

Modified (actual)

Paste two JSON documents to compare them

Key order is always ignored. Tick “Ignore array order” to compare arrays as unordered sets.

About this tool

A plain text diff of two API responses is noisy: reordered keys and different whitespace show up as changes even though the data is identical. This checker parses both documents and compares their structure, so only real differences are reported. Each one is listed with a JSONPath-style location ($.user.roles[1]) and a type: added, removed, changed, or type-changed, the last being the classic "49.99" versus 49.99 bug. Use it to explain a failing assertion, review a contract change between API versions, or check a snapshot update before you accept it.

How to use it

  1. Paste the expected (or older) JSON on the left and the actual (or newer) JSON on the right, or click “Load sample”.
  2. Read the change list: each row shows the change type, the path and the before → after values.
  3. Tick “Ignore array order” when arrays are really sets, such as roles, tags or unordered search results.
  4. Switch to “Side by side” or “Unified” to see the changes in context; both views sort keys first so reordering is not reported.

JSON Diff Checker FAQ

What is the difference between “changed” and “type-changed”?

“Changed” means the value differs but the JSON type is the same, for example "pending" becoming "shipped". “Type-changed” means the type itself differs, such as a number becoming a string or an object becoming null. Type changes are often contract bugs that break strictly typed clients even when the value looks the same.

How are arrays compared when “Ignore array order” is on?

Each element on the left is matched with a deeply equal element on the right. Leftovers are reported as removed or added at their own index. Duplicates count, so [1, 2, 2] and [2, 1] still differ. Because elements are matched by full equality, a changed object inside an unordered array appears as one removal plus one addition.

Can I use these paths in my tests?

Yes. The paths use dot notation for simple keys and bracket notation for keys with spaces or symbols, which works in the JSONPath Tester and maps directly onto JSONPath assertions in tools such as REST Assured or Postman.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →