Merge & Compare Two Lists
Find common items, unique items, duplicates, and merge โ instantly.
What does this tool do?
The List Compare tool takes two lists of items โ one item per line โ and computes six different views: items common to both lists, items only in List A, items only in List B, all unique items across both lists, a merged combination, and duplicate items found within each list. All processing happens instantly in your browser as you type.
This is useful for comparing email lists, product SKUs, user IDs, filenames, keywords, or any set of records where you need to find overlap or difference. The case-insensitive option lets you treat "Apple" and "apple" as the same item. The sort option outputs results alphabetically for easier scanning.
The operations this tool performs map directly to fundamental concepts in set theory. The Common tab computes the intersection (A โฉ B) โ elements that belong to both sets simultaneously. The All Unique tab computes the union (A โช B) โ every distinct element that appears in either set. Only in A and Only in B represent the relative complements (A \ B and B \ A respectively) โ elements in one set that are absent from the other. These are the same operations taught in discrete mathematics and used throughout computer science, statistics, and logic.
If you work with databases, you'll recognise these as the list equivalents of SQL joins. The Common tab mirrors an INNER JOIN โ only rows matched on both sides. Only in A is a LEFT JOIN โฆ WHERE B IS NULL โ rows in the left table with no match on the right. Only in B is the inverse: a RIGHT JOIN โฆ WHERE A IS NULL. The All Unique tab corresponds to a FULL OUTER JOIN with duplicates removed โ every row from both sides, deduplicated. The Merged tab is a plain UNION ALL (or UNION with deduplication enabled), combining both sides without filtering.
How to use
- Paste your first list into the List A box โ one item per line.
- Paste your second list into the List B box โ one item per line.
- Click a tab to see Common, Only in A, Only in B, All Unique, Merged, or Duplicates.
- Toggle options to control case sensitivity, whitespace trimming, sorting, and deduplication.
- Click Copy to copy the current result to your clipboard.