What it does
Compares two newline-separated lists using the four classic set operations - union, intersection, difference, and symmetric difference - and returns the deduplicated result. Each list is pasted into its own box; the result updates live as you type or switch operation.
It is the quickest way to answer questions like “which items appear in both files?”, “what did I remove from version B?”, or “give me everything, but only once”. Whitespace is trimmed and blank lines dropped by default, and an optional case-insensitive mode treats Foo and foo as the same item while preserving the first casing seen.
How to use it
- Paste your first list into List A and your second into List B (one item per line).
- Pick the Operation: Union (A ∪ B), Intersect (A ∩ B), A − B (items only in A), or Symmetric (items in exactly one list).
- Toggle Trim to strip whitespace and drop empty lines (on by default), or Case-insensitive to match across casing.
- Copy the result with the copy button, or share a link that encodes both lists and settings.
Examples
Union of two lists (deduped, A then B):
A: apple B: banana → apple
banana cherry banana
cherry date cherry
date
Intersection (items in both):
A: apple B: banana → banana
banana cherry cherry
cherry date
Difference A − B (items only in A):
A: apple B: banana → apple
banana cherry
cherry date
Case-insensitive intersection (X matches x, first-seen casing emitted):
A: X B: x → X
Good to know
- Ordering: Union emits A’s items first (in order) then B’s new items; intersection and difference preserve A’s order; symmetric difference lists A-only then B-only. Items are always deduplicated.
- Case handling: By default
Fooandfooare distinct. Enable Case-insensitive to treat them as one, keeping the first casing encountered. - Private: all processing runs 100% client-side - your lists never leave the browser.
- Related tools: List Converter (change separators, sort, dedupe a single list), Sort Lines, Remove Duplicate Lines.