JSON Diff Tool

Compare two JSON documents online. The tool walks every level recursively and lists added, removed and changed keys with their exact paths, treating arrays as single values, which suits API responses and configuration checks.

FreeOnline Tool
Loading…

How to Use

  1. Paste the two JSON documents you want to compare into the "JSON A" and "JSON B" boxes
  2. Click "Compare" and every difference is listed below, labeled as added, removed or changed
  3. Each entry shows the exact field path (for example user.name) together with the old and new values
  4. Click "Load sample data" to see an example that contains all three types of difference

Features

  • Compares every level of two JSON objects recursively and pinpoints each difference with a dotted path such as user.address.city
  • Three difference types: added (a field that only appears in B), removed (a field present in A but missing from B) and changed (the same key with a different value)
  • Identical fields are omitted from the result, so you only see what actually differs
  • Arrays are compared as a single value, meaning any change inside an array marks the whole array field as changed rather than diffing element by element
  • If JSON A or JSON B is malformed, a clear error message tells you which of the two documents has the problem

Use Cases

Comparing API responses
Diff the JSON an endpoint returns across environments or points in time to find exactly what changed.
Reviewing configuration changes
Compare a JSON configuration file before and after an edit to confirm the change is limited to what you intended.
Verifying a data migration
Diff JSON snapshots of the source and migrated data to check that no field was dropped or altered along the way.
Checking mock data in code review
Compare the old and new mock JSON in a pull request to see at a glance how the test data was adjusted.

FAQ

Are changes inside an array listed element by element?
No. An array is compared as one value, so any difference in its contents, including element changes or a different order, marks that array field as changed and shows the full array before and after. There is no element-level diff.
What happens if a field changes from an object to a number?
It is reported as a changed field, because the value at that path is different overall. Both original values are shown side by side so you can compare them.
What if the two documents are identical?
The tool tells you that the two JSON documents are identical and lists no differences.
Is the JSON I compare uploaded anywhere?
No. The whole comparison is computed in your browser and nothing is uploaded, so it is safe to compare API data that contains sensitive information.