Compare Two Lists
Text Tools · Added
Two lists that ought to match rarely do. Paste them side by side and this works out the intersection, each side's exclusive entries and the union — the four answers you actually want when reconciling an export against a spreadsheet.
How to use the compare two lists
- 1Paste the first list into the left box, one entry per line.
- 2Paste the second list into the right box.
- 3Choose how strictly to match: case, surrounding whitespace and blank lines are each yours to decide.
- 4Read the four result groups, and copy any one of them out.
Examples
Reconciling two short lists
- Input
- Left: apple, banana, cherry, banana, date · Right: banana, cherry, elderberry
- Result
- In both: banana, cherry. Only left: apple, date. Only right: elderberry. Union of 5. Overlap 66.7%, with a note that the left list held one repeat.
An export against a spreadsheet
- Input
- 1,400 order references from a system export and 1,395 from a finance sheet
- Result
- The five references present in one and not the other, listed rather than counted — which is the part a row count never tells you.
Turn case sensitivity off when one system upper-cases its identifiers and the other does not.
About the compare two lists
Four answers, not one
The question 'do these two lists match?' almost always decomposes into four separate questions, and a yes-or-no answer is useless for all of them. What did both sides agree on? What did the first hold that the second missed? What did the second hold that the first missed? And what is the full picture once you put them together?
Those are the intersection, the two relative complements and the union. Naming them that way sounds academic until you notice that a reconciliation, a mailing-list merge and a stocktake are the same operation with different nouns attached.
Where normalisation decides the answer
Most list comparisons that produce a wrong answer produce it before any comparing happens. One system exports with a trailing space, another upper-cases its references, a third leaves a blank line at the end of the file — and suddenly two identical lists share nothing at all.
The switches on this page are deliberately explicit rather than helpfully automatic. Silently trimming and lower-casing everything would fix the common case and quietly break the one where an identifier really is case-sensitive, and you would have no way of telling which had happened.
Frequently asked questions
What happens to duplicate entries?
Does the comparison respect case and spaces?
How is the overlap percentage worked out?
Is this the same as a diff?
Related tools
Text Diff Checker
Text Tools
Compare two versions of a text and see exactly which lines were added, removed or left alone.
Remove Duplicate Lines
Text Tools
Strip duplicate lines from a list, with options for case sensitivity and trimming.
Text Sorter
Text Tools
Sort lines alphabetically, numerically, by length or randomly, ascending or descending.