Compare JSON Arrays
Find differences between two JSON arrays. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
0 chars
Output
Find differences between two JSON arrays.
Type or paste above to see the result here.
What you paste never leaves this tab
Compare JSON Arrays is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, an API response with live access tokens in it is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Compare JSON Arrays
- 1. Paste the two arrays. Paste the first JSON array into List A and the second into List B, or open a file in either pane. A pane of plain lines works too: each line becomes one item.
- 2. Match records by a key (optional). For lists of objects, tap a key such as id under Match objects by. Records with the same id then count as one record, and those whose other fields differ are listed as Changed.
- 3. Read the comparison. The result shows a card each for Only in A, Only in B and In both, with counts and a Copy button on every card. Copy all copies the whole comparison as JSON.
When to use Compare JSON Arrays
Compare JSON Arrays finds the set differences between two JSON arrays, showing what's unique to each one and what they share. Reach for Compare JSON Arrays whenever order doesn't matter and you just need to know which values were added, removed, or kept.
- Finding churn between two ID exports. You exported a list of active user IDs this week and last week and want to know exactly who was added and who dropped off between the two snapshots.
- Checking two feature-flag allowlists. Two versions of a feature flag's allowlist should mostly overlap, and you want to confirm the only difference is the one account that was intentionally added.
- Verifying a migration produced the same IDs. A data migration script re-generated a list of record IDs, and you want to confirm the new list matches the old one exactly with nothing missing or extra.
- Auditing two permission lists. Security review requires confirming that a role's permission array in staging matches production exactly, so any drift shows up clearly in the onlyInFirst or onlyInSecond groups.
Examples
Compare two ID lists
Input
[1, 2, 3]
Output
{
"onlyInFirst": [
1
],
"onlyInSecond": [
4
],
"inBoth": [
2,
3
]
}About the Compare JSON Arrays tool
Compare JSON Arrays does its work locally, right in the browser. Find differences between two JSON arrays. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the JSON Tools collection on EditSafely, a set of 90 small, focused JSON utilities that share the same instant, private workspace.
You can shape the output with 2 settings, including Match objects by key and Indent, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Does Compare JSON Arrays cost anything?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.