Compare Two Lists

Paste two lists to see what they share and what is only in one of them. To delete repeated lines from a single list, use remove duplicates from one list. To list only the shared items, use find duplicates in two lists. Everything runs in your browser, so the lists are not uploaded.

Blank lines are always skipped. Trim spaces removes characters at the start and end of a line only. Repeated items are listed once, using the first spelling.

How to compare two lists

  1. Paste the first list into List A and the second into List B. Each item goes on its own line, or choose comma, tab, or semicolon as the separator.
  2. Choose your options. Ignore case treats Apple and apple as the same item. Trim spaces removes stray spaces copied from spreadsheets. Blank lines never count, even if trim is off.
  3. Click Compare, then pick which result to view: items in both lists, only in A, only in B, every unique item, or the duplicates inside each list.
  4. Copy the result, download it as text, or download a CSV with four columns side by side for Excel or Google Sheets.

What each result means

ResultSet operationExample use
In bothIntersection of A and BCustomers who are also newsletter subscribers
Only in ADifference A minus BEmails not yet invited
Only in BDifference B minus ANew keywords a competitor ranks for
UnionA and B together, without repeatsMerging two contact lists
DuplicatesValues repeated inside one list, shown onceCleaning a list before import

Example

List A: apple, banana, Cherry, date, banana. List B: cherry, date, elderberry, fig. With ignore case and trim on, the lists share Cherry and date. Only A has apple and banana, only B has elderberry and fig, and banana is a duplicate within A. The union has six unique items.

Comparing lists in Excel vs. online

In Excel you can use =COUNTIF(B:B,A2)>0 or XLOOKUP to flag matches, but that means writing formulas, dealing with extra spaces, and repeating the check in each direction. This tool returns all of those results together and handles case and end spaces. A normal laptop can compare tens of thousands of lines, including about 50,000, because the check uses hash maps rather than nested loops. The Excel and Google Sheets guide shows the formula versions.

Your lists stay on this device

The comparison runs in JavaScript in your browser. Nothing is uploaded, so it is a practical way to handle customer emails, order numbers, and other private lists. Still check the output before a mail merge or import.

Popular uses

If your data has a header row, remove it first, or it will be compared like any other item.

Handling messy data

Lists copied from spreadsheets, PDFs, or email often contain trailing spaces, blank lines, mixed capitalization, and Windows line endings. With trim and ignore case on, those differences are normalized before comparing, so "John@Example.com " and "john@example.com" count as the same item. The original spelling of the first occurrence is kept. Spaces inside a line are not collapsed, and lookalike characters are not treated as matches. This is an exact comparison, not a fuzzy one.

Frequently asked questions

How do I find the differences between two lists?

Paste both lists, click Compare, and choose Only in A or Only in B to see the items that appear in one list but not the other.

Is the comparison case-sensitive?

Not by default. Untick Ignore case to treat Apple and apple as different items.

Does this page also show repeats inside one list?

Yes. After you compare two lists, duplicates within A and within B are listed once each, using the first spelling. To strip repeats from a single list and keep the first line, use the remove duplicates page. To list only shared items, use the find duplicates in two lists page.

How many items can I compare?

Tens of thousands of lines work in the browser, including lists around 50,000 lines. The limit is your device memory.

Can I compare comma-separated values?

Yes. Set Split items by to comma, tab, semicolon, or any of these.

More tools and guides