<link rel="stylesheet" type="text/css" href="/mirawhite.css">

Compare two lists

Paste one value per line in each box: emails, names, product codes. The four results update as you type, each with its count and a copy button. Free, with no sign-up.

Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.

Compare two lists

Options

Results

Paste a list in A and in B to compare them.

How to use it

  1. Paste list A in the first box and list B in the second, one value per line.
  2. Choose whether to ignore case, spaces or accents when comparing.
  3. Read the four results (only in A, only in B, in both, union) and copy the one you need.

Example

Input

List A:
anna@example.com
ben@example.com
chloe@example.com
david@example.com

List B:
Ben@example.com
david@example.com
emma@example.com

Output

Only in A (2): anna@example.com, chloe@example.com
Only in B (1): emma@example.com
In both (2): ben@example.com, david@example.com
Union (5): anna@example.com, ben@example.com, chloe@example.com, david@example.com, emma@example.com

Good to know

  • Spaces at the start and end of each line are always ignored, and empty lines are skipped.
  • Each result lists a value once, even if it appears several times in a list. Values keep the spelling of their first appearance (list A first).
  • Values are compared line by line: a line holding “Anna, Ben” is a single value.

Frequently asked questions

How do I compare two lists in Excel to find what is missing?

In a column next to list A, type =COUNTIF(B:B,A2)=0 and fill it down: TRUE marks values missing from list B. On this page, paste both columns and read “Only in A” and “Only in B” directly, with no formula and both directions at once.

How do I find the matches between two lists?

Paste the lists in A and B and read “In both”: every value present in the two lists, listed once. “Union” gives every value from either list without duplicates, handy for merging two mailing lists.

How do I see who doesn’t follow me back on Instagram?

Instagram lets you download your information, including your followers and the accounts you follow. Paste your followers in list A and the accounts you follow in list B: “Only in B” shows the accounts that do not follow you back. Usernames must be one per line.

Is “Anna@example.com” the same as “anna@example.com”?

Yes, by default: case is ignored, which suits emails and names. Untick “Ignore case” for codes where capitals matter. You can also ignore all spaces or accents, and spaces at the start and end of lines are always ignored.

How do I compare two lists in Python?

Turn them into sets: set(a) - set(b) gives the items only in a, set(a) & set(b) the common ones and set(a) | set(b) the union. This page gives the same four results without code, keeping the original order of the values.

← Back to all tools