List compare

Compare two lists and find common or unique items.

The interactive form is ready when JavaScript is enabled.

How to use

Paste two lists to see what they share, what only the first one has and what only the second one has — the three answers you need when reconciling an export against a system, or last month's list against this month's.

Each line is one item. Commas, semicolons and tabs are not separators, so “apple, pear” on one line is a single item; a column copied from a spreadsheet pastes one value per line, which is what you want. Three options, all on by default, decide when two lines count as the same: Ignore uppercase/lowercase, Trim surrounding spaces and Ignore blank lines. Each result keeps the item as you wrote it and in its original order; when two spellings differ only in case, In both lists shows the one from list A. The comparison runs in the browser and the lists are not uploaded.

This is set arithmetic, so repeats inside a list collapse before the comparison: it answers which values appear, never how many times. If a value appearing twice matters — a double charge, a duplicated row — that is a different question, and deduplicating first will hide it. The normalisation traps are the same as anywhere else: a trailing space or a different kind of apostrophe puts an item in 'only in A' while you can plainly see it in B.

Example

Two items occur in both lists; each list also has one item absent from the other.

  • The built-in exampleList A: apple, banana, orange. List B: banana, pear, orange. In both lists: banana and orange. Only in list A: apple. Only in list B: pear.
  • Names with different capitalsAna Silva in A and ANA SILVA in B match while Ignore uppercase/lowercase is on, and In both lists shows Ana Silva. Turn it off and each one appears only in its own list.
  • A repeated lineINV-104 twice in A and once in B: In both lists shows it once, with a count of 1. The comparison never reports how many times a value was repeated.
  • A trailing space“banana ” in A and “banana” in B are the same item while Trim surrounding spaces is on. Turn it off and one goes to Only in list A, the other to Only in list B.

Frequently asked questions

Does it count how many times a value appears?

No. Each list is reduced to its distinct values first, so three copies of the same line count once. For anything where the count is the point — reconciling quantities, finding a duplicate payment — compare the counts separately; a set comparison will quietly tell you everything matches.

An item is in both lists but shows as only in A — why?

The two copies are not identical as text. Enable trimming and case-insensitivity, which covers most of it. What remains is usually a character that looks the same and is not: a non-breaking space, a typographic apostrophe, or an accented letter stored in two different ways.

Can I paste a comma-separated list?

Not as it is: each line is one item, so a whole comma-separated row counts as one. Put one value per line — a spreadsheet column pastes that way — or replace the commas with line breaks first.

Should email addresses be compared ignoring case?

Usually, yes. Under the email standard (RFC 5321) the domain after the @ is never case-sensitive, while whether Ana and ana before the @ are the same mailbox is up to the receiving server; using case to tell mailboxes apart is discouraged and the large providers do not. Keep the option off only if your own system treats them as different.

Related tools