Compare text lists
Find exact unique lines shared by two lists, or present only in one list.
Input
Tip: press Ctrl + Enter to run
Saved settings
About this tool
Which customers are on last month’s list but not this month’s? Which product codes are in the warehouse export but missing from the store? This tool compares two lists of lines and shows three groups: lines in both, lines only in the first list and lines only in the second. Each group lists unique lines once.
Matching is exact, so prepare both lists the same way (same case, no stray spaces) for reliable results.
How to use it
- Paste the first list, one item per line.
- Paste the second list in the second box.
- Run the comparison.
- Copy whichever group you need: common items, items only in the first list or only in the second.
How the calculation works
Each list is reduced to its set of unique lines. The output shows the intersection, the first set minus the second, and the second set minus the first, each in the order of first appearance.
Worked example
List A has ana@x.com, bo@x.com and cy@x.com; list B has bo@x.com, dee@x.com and ana@x.com. The comparison shows 2 common lines (ana@x.com and bo@x.com), cy@x.com only in the first list and dee@x.com only in the second.
Sample input and result
A ∩ B; A − B; B − A
Limitations
- Exact line matching only.
- Duplicates within a list are shown once.
- Up to 100,000 characters per list.
Last updated:
Frequently asked questions
Is the comparison case-sensitive?
Yes. Convert both lists to lowercase first if case should not matter, as with email addresses.
Does the order of the lists matter?
Only for which group is called "first" and "second". The common items are the same either way.
How is this different from a diff checker?
A diff checker shows changes in order within a document. This tool treats each list as a set and ignores order.
Troubleshooting
Items that look identical are reported as different.
Check for trailing spaces, different capitals or invisible characters from spreadsheets.
Everything is "only in" one list.
One list may use a different separator, such as commas on one line. Put one item per line.
Numbers like 007 and 7 do not match.
They are different text. Format both lists the same way first.
Privacy & Free to use
Are my inputs stored?
Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.
Is this tool free?
Yes. No signup or payment is required.
See also
Useful next steps
Word & character counter
Count words, visible characters, paragraphs and lines locally, using language-aware segmentation.
Text & writingText case converter
Switch between uppercase, lowercase, title case and sentence case in one tool.
Text & writingRemove duplicate lines
Keep the first occurrence of every exact line and preserve the original order.
Text & writing