Compare two lists
Compute intersection, union or differences between two lists with first-occurrence ordering and explicit comparison options.
How to use
Paste both lists and select intersection, union or a difference. Set the comparison language, case sensitivity, trimming and empty-line policy. Process and review the items before copying or downloading.
A contains red, blue, red; B contains blue, green. Intersection is blue, union is red then blue then green, and A-only is red.
Support & limits
The tool uses set semantics: one result per comparison key, retaining its first occurrence. Intersection and A-only preserve A order; B-only preserves B order; union and symmetric difference list A before applicable B items. Trimming and dropping empty lines are off by default. A valid result may be empty.
Common questions
Does it compare how many times an item appears?
No; these are set operations, not frequency comparisons. Different repetition counts do not change membership in the intersection or union.
Related tools
Remove duplicate lines
Keep the first occurrence of each line using your rules.
Sort lines
Sort lines by locale, exact decimal value or natural order, with an explicit processing language and whitespace options.
Filter lines
Include or exclude lines containing literal text, with an explicit case-sensitivity policy.