Merge & Compare Two Lists

Find common items, unique items, duplicates, and merge โ€” instantly.

Ad
Common 0
Only in A 0
Only in B 0
All Unique 0
Merged 0
Duplicates 0
Items in both lists
Paste items into both lists above to compare.
0
List A items
0
List B items
0
Common
0
All unique
Ad

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

  1. Paste your first list into the List A box โ€” one item per line.
  2. Paste your second list into the List B box โ€” one item per line.
  3. Click a tab to see Common, Only in A, Only in B, All Unique, Merged, or Duplicates.
  4. Toggle options to control case sensitivity, whitespace trimming, sorting, and deduplication.
  5. Click Copy to copy the current result to your clipboard.

Frequently Asked Questions

The Duplicates tab shows items that appear more than once within either list individually โ€” not items that appear in both lists. For cross-list overlap, use the Common tab. If the "Remove duplicates within each list" option is checked, duplicates are removed before comparison, which affects the counts in all other tabs.

The tool uses line breaks as the delimiter. To compare comma-separated or semicolon-separated lists, first find-and-replace the separator with a newline in a text editor, then paste the result here. Support for custom delimiters may be added in a future update.

No. All comparison logic runs entirely in your browser. Your list contents are never sent to any server, never logged, and never stored. Closing the tab removes everything immediately.

Related Tools

Ad