Compare two lists
Finds what is only in list A, only in B, in both, or different between them.
Put your first list in the main box and your second list in the List B box below the buttons, one item per line in each. Choose what you want to see and press Compare.
Five questions, one tool
"Compare two lists" means different things depending on what you are checking, so the mode dropdown covers all of them:
- Only in list A — items in the first list that are missing from the second. "Which of last month's customers did not order this month." "Which files are in the backup but not the restore."
- Only in list B — the reverse. "Which are new this month." "What got added."
- In both lists — the overlap. "Which subscribers are on both mailing lists." "Which items appear in both reports."
- Different — everything that is in one list but not the other, both directions at once. The full set of changes.
- All combined — both lists merged with duplicates removed. A quick way to union two lists.
The options that decide the answer
Ignore surrounding spaces is on by default, and it is usually what saves you. Lists copied from different
sources carry different trailing whitespace, and without trimming, "apple" and "apple " count
as different items — so a comparison reports differences that are not real. Leave it on unless the spacing is
meaningful.
Ignore case treats Apple and apple as the same. Turn it on when the lists came from
systems that capitalise differently, off when case is part of the identity — as it is for passwords, codes and
case-sensitive identifiers.
The comparison is by exact value after those options are applied. It finds items that match or do not; it does not
detect that Jon and John are "nearly" the same, because fuzzy matching would produce guesses
you could not trust for reconciliation.
Uses
- Reconciling records. Two exports that should contain the same people, orders or products — the difference is your discrepancy.
- Finding what changed between two versions of a list.
- Deduplicating across sources. Which emails are already on your list before you add a new batch.
- Access and membership. Who is in one group but not another.
- Inventory and catalogues. What is in stock but not listed, or listed but not in stock.
Doing it without this tool
Excel: =IF(COUNTIF(B:B, A1)=0, "only in A", "") filled down, then filter. It works and takes
several columns and a filter step, and Excel's matching quietly ignores case, which is sometimes wrong.
Command line: comm is built for this — comm -23 <(sort a.txt) <(sort b.txt)
for only-in-A — but it requires both files sorted first and the syntax is easy to get backwards.
Dedicated sites: several exist (listdiff and similar), which is a sign the need is real; most show one comparison mode rather than all five.
Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.
How to use it
- Paste your first list into the main box, one item per line.
- Paste your second list into the List B box, one item per line.
- Choose what to show: only in A, only in B, in both, different, or all combined.
- Press "Compare". Leave "Ignore surrounding spaces" on to avoid false differences.
Related tools
Frequently asked questions
Choose "Only in list A" for items missing from the second list, or "Only in list B" for the reverse. "Different" shows both directions at once — the full set of changes.
Almost always trailing spaces from copying the lists out of different sources. Keep "Ignore surrounding spaces" ticked, which is the default, and those false differences disappear.
By default yes — Apple and apple are treated as different. Tick "Ignore case" when the lists come from systems that capitalise differently. Leave it off for passwords and case-sensitive codes.
No. It compares exact values so the results are trustworthy for reconciliation. Fuzzy matching would produce guesses you could not rely on.
Choose "All items combined", which unions both lists and removes duplicates.