TapCub is live — analytics, insights and live chat, free on one platform

Free tool · Diff JSON diff: compare two JSON objects by structure

Paste two API responses, configs or exports. Instead of a line diff that lights up whenever keys move around, you get the real changes as JSON paths: what was added, what was removed, which values changed and where a number turned into a string. Arrays of records can be matched by their id, so a reordered list is not reported as everything changed.

  • Changes by JSON path
  • Key order ignored
  • Runs in your browser

Compare two JSON documents

Original on the left, changed version on the right. The sample is a user record from two versions of an API. Results update as you type.

JSON diff

By position, or match objects in an array by a key such as id or sku.

Each object in the array needs this key with a unique value; otherwise that array falls back to position.

7 differences found. Key order and whitespace are ignored.

Added

2

Keys or array items only in the changed JSON.

Removed

1

Keys or array items only in the original.

Changed

4

Different value, including a change of type.

Unchanged values

6

Leaf values that are equal on both sides.

Notes

  • Note1 array items matched by key changed position. Order changes are not counted as differences.

Changes by path

Hover a value to see it in full.

PathChangeOriginalChanged
/planChanged"pro""team"
/roles/1/nameChanged"editor""admin"
/roles/2Added—{"id":"r3","name":"analyst"}
/settings/weeklyReportChangedtruefalse
/settings/seatsType changed5"5"
/lastLoginRemoved"2026-11-20T08:15:00Z"—
/mfaAdded—true
Change list
~ /plan: "pro" → "team"
~ /roles/1/name: "editor" → "admin"
+ /roles/2: {"id":"r3","name":"analyst"}
~ /settings/weeklyReport: true → false
! /settings/seats: 5 → "5"
- /lastLogin: "2026-11-20T08:15:00Z"
+ /mfa: true

+ added, - removed, ~ changed, ! type changed. Paste it into a ticket or review.

Side by side, keys sorted

Both documents pretty-printed with keys in alphabetical order, then compared line by line. Array order is kept.

RemovedAdded

1{1{
2 "email": "lena@example.com",2 "email": "lena@example.com",
3 "id": 1042,3 "id": 1042,
4 "lastLogin": "2026-11-20T08:15:00Z",4 "mfa": true,
5 "plan": "pro",5 "plan": "team",
6 "roles": [6 "roles": [
7 {7 {
8 "id": "r2",
9 "name": "billing"
10 },
11 {
8 "id": "r1",12 "id": "r1",
9 "name": "editor"13 "name": "admin"
10 },14 },
11 {15 {
12 "id": "r2",16 "id": "r3",
13 "name": "billing"17 "name": "analyst"
14 }18 }
15 ],19 ],
16 "settings": {20 "settings": {
17 "seats": 5,21 "seats": "5",
18 "timezone": "Europe/Berlin",22 "timezone": "Europe/Berlin",
19 "weeklyReport": true23 "weeklyReport": false
20 }24 }
21}25}
Unified diff of the sorted JSON (.diff)
--- a
+++ b
@@ -1,21 +1,25 @@
 {
   "email": "lena@example.com",
   "id": 1042,
-  "lastLogin": "2026-11-20T08:15:00Z",
-  "plan": "pro",
+  "mfa": true,
+  "plan": "team",
   "roles": [
     {
+      "id": "r2",
+      "name": "billing"
+    },
+    {
       "id": "r1",
-      "name": "editor"
+      "name": "admin"
     },
     {
-      "id": "r2",
-      "name": "billing"
+      "id": "r3",
+      "name": "analyst"
     }
   ],
   "settings": {
-    "seats": 5,
+    "seats": "5",
     "timezone": "Europe/Berlin",
-    "weeklyReport": true
+    "weeklyReport": false
   }
 }
Runs entirely in your browser. Nothing you type here is uploaded or stored by TapCub.

Use this tool often? Save it to My tools.Saved to My tools. Find it any time at the top of the free tools page. You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.

Problem or suggestion?Send feedbackChat with support

Version v1.1Updated Update history

NewNew JSON diff page: compares two JSON documents by structure, ignores key order, matches arrays by index or by a key such as id, and lists added, removed and changed paths.

Reading the result

A JSON path for every real change

The table lists only differences in data. The side-by-side view underneath shows the same documents normalised, so you can see each change in context.

  • Side-by-side or unified view
  • Ignore whitespace and case
  • Fast on 10,000+ lines, runs locally
Diff checker illustration: Compare two texts, robots.txt files or configs and see additions and deletions by line, word or character
Diff checker, illustrated

Path

Where the change is. JSON Pointer (RFC 6901) is /roles/1/name, the form JSON Patch and many validators use; the dot style roles[id="r1"].name reads more easily and names matched items by their key.

Added and removed

A key or array item that exists on only one side. The whole value is shown, so a new nested object counts as one addition, not one per field.

Changed and type changed

The same path holds a different value. “Type changed” flags a quieter bug: 5 becoming "5", or an object becoming an array, which can break code that reads the field.

Arrays

By position, item 0 is compared with item 0. Matched by key, items with the same id are compared wherever they sit, and a reordered list produces no differences, only a note.

Both documents are parsed in your browser and never sent anywhere, so API responses with real customer data can be compared safely.

How to use it

Compare JSON in three steps

Typical uses: an API response before and after a release, two environments’ configs, an export from yesterday and today.

  1. 1

    Paste both documents

    Original left, changed right. Formatting does not matter: minified JSON and pretty-printed JSON compare equally.

  2. 2

    Choose how arrays are matched

    Lists of records with an id or sku: “Match objects by key”. Ordered data such as coordinates or steps: keep “By position”.

  3. 3

    Read and share

    Scan the change table, copy the change list into a ticket, or download the unified diff of the sorted JSON.

How it compares

Walk both trees, compare the leaves

Both sides are parsed with the browser’s JSON parser and walked together from the root.

  • Objects: keys are paired by name, so order never matters; a key on one side only is added or removed
  • Arrays: paired by index, or by the value of the match key when every item is an object with a unique scalar key
  • Leaves: compared by type and value; numbers by value, so 1, 1.0 and 1e0 are equal
  • The side-by-side view sorts keys alphabetically and indents with two spaces, then runs the same line diff as the text diff checker
What counts as a difference
OriginalChangedResult
{"a":1,"b":2}{"b":2,"a":1}No difference (key order)
{"n":1}{"n":1.0}No difference (same number)
{"n":5}{"n":"5"}Type changed
[1,2,3][1,3]By position: /1 changed, /2 removed
[{"id":1},{"id":2}][{"id":2},{"id":1}]By key: no difference
Worked example

What changed in the user record

The default sample, compared with arrays matched by id. Keys were reordered and the roles list was shuffled; none of that is reported.

Differences in the default sample
PathChangeOriginalChanged
/planChanged"pro""team"
/roles/1/nameChanged"editor""admin"
/roles/2Added—{"id":"r3","name":"analyst"}
/settings/weeklyReportChangedtruefalse
/settings/seatsType changed5"5"
/lastLoginRemoved"2026-11-20T08:15:00Z"—
/mfaAdded—true

2 added, 1 removed, 4 changed, 6 values unchanged. Switch arrays to “By position” and the shuffled roles list adds three more changes, because item 0 is now r2 instead of r1.

Common mistakes

When a JSON diff looks noisy

Most noise comes from comparing the wrong way, not from the data.

Comparing lists by position

APIs often return records in a different order. Match by id and only real changes remain.

Long numeric IDs

IDs above 2^53, such as 64-bit database keys, lose precision in JavaScript. Two different IDs can compare as equal; keep them as strings.

JSON with comments

Comments, trailing commas and single quotes are JavaScript or JSON5, not JSON. The error names the line and column to fix.

Volatile fields

Timestamps, request IDs and tokens change on every call. Expect them in the list, or remove them before comparing.

FAQ

JSON diff questions

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

How do I compare two JSON objects online?

Paste the original on the left and the changed version on the right. Differences are listed immediately by path, with added, removed and changed values; key order and formatting are ignored.

Does key order matter?

No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are the same data. Only array order can be a real difference, and you choose how arrays are compared.

How are arrays compared?

By default item by item, by position. If your arrays hold records with an id, sku or similar key, choose “Match objects by key”: items are paired by that value and reordering is not reported as a change.

What is a JSON Pointer path?

A path format from RFC 6901: /roles/1/name means key roles, item 1, key name. A / inside a key is written ~1 and ~ as ~0. JSON Patch uses the same paths.

Why does it say my JSON is invalid?

The message gives the line and column of the first error. Usual culprits are a trailing comma, single quotes, an unquoted key, or comments copied from a JavaScript file. Fix it with the JSON formatter and compare again.

Is my JSON uploaded?

No. Parsing and comparing happen in your browser, nothing goes into the URL, and the page has no share link.

Feedback

Is this tool working for you?

Rate it, or tell us what went wrong and what you’d like improved. A person reads every message, and frequent requests go into the next update.

Rate this tool

Please don’t include passwords or other sensitive information.

Only used to reply to this feedback.

Type, details and email are required.

We only use this to handle your feedback. See the privacy policy.

Feedback received

Thank you! We will read it and reply from hello@tapcub.com if needed.

Need help right now?

Chat with our support team, best for urgent problems; you can leave a message when we are offline.

Chat with support
Changelog

Update history

New features, fixes and data refreshes for this tool, newest first.

  1. · v1.1

    New featureNew JSON diff page: compares two JSON documents by structure, ignores key order, matches arrays by index or by a key such as id, and lists added, removed and changed paths.

  2. · v1.0

    LaunchedFirst release.

Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates

Cite this tool

Recommend this tool in an article or on your site

This tool is free to cite and share. Copy the URL or link below into your article, tutorial or resource page; to write a review, embed a tool or partner with us, get in touch.

URL
https://tapcub.com/tools/diff-checker
HTML link
<a href="https://tapcub.com/tools/diff-checker">Diff checker - TapCub</a>

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics