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:

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

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.

Try:
0Words
0Characters
0No spaces
0Sentences
0Paragraphs
0Lines
0Pages
0Reading
0Speaking

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

  1. Paste your first list into the main box, one item per line.
  2. Paste your second list into the List B box, one item per line.
  3. Choose what to show: only in A, only in B, in both, different, or all combined.
  4. Press "Compare". Leave "Ignore surrounding spaces" on to avoid false differences.

Related tools

Text repeaterRepeats your text as many times as you want, with any separator.Join linesMerges every line into a single line with the separator you choose.Add line numbersNumbers every line, in the format you choose — and removes numbering too.Find and replaceRuns many replacements in one pass — one rule per line.Magic 8 ballAsk a yes or no question. The ball answers.PDF text breaksThe file has no paragraphs to give you. Here is what it does have, and how to…Cursive textHandwriting-style letters you can paste anywhere plain text goes.

See all text tools →

Frequently asked questions

How do I find items that are in one list but not the other?

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.

Why does it report differences that look identical?

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.

Does case matter?

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.

Can it find near-matches like Jon and John?

No. It compares exact values so the results are trustworthy for reconciliation. Fuzzy matching would produce guesses you could not rely on.

How do I just merge the two lists?

Choose "All items combined", which unions both lists and removes duplicates.