Compare JSON Arrays
Find differences between two JSON arrays. Runs entirely in your browser, so your data never leaves your device.
Drop a file here, or click to browse
Files never leave your device
Drop a file here, or click to browse
Files never leave your device
Output
The result appears here as you type.
How to use Compare JSON Arrays
- 1. Add two JSON array files. Drop or browse for the two .json files containing the arrays you want compared. Each element is treated as a member of a set for the comparison.
- 2. Pick an indent. Choose 2 spaces, 4 spaces or tabs to control how the resulting onlyInFirst, onlyInSecond and inBoth arrays are formatted for display.
- 3. Review the visual result. See which elements exist only in the first array, only in the second, and in both, giving you a clear set-based comparison instead of a positional line diff.
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
a.json [1, 2, 3] and b.json [2, 3, 4]
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 the Indent setting, and the result refreshes the moment you change it. 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 you type or drop a file, 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,658 tools on EditSafely work without an account, a subscription or usage limits.
Are my files uploaded to a server?
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.
Which files does Compare JSON Arrays accept?
It accepts JSON files. There is no file size cap imposed by a server; very large files are limited only by your device's memory.
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.
Can I save what the tool produces?
Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.