List Set Operations
Compare two text lists and compute their union, intersection, difference or symmetric difference — one item per line, with an optional case-insensitive mode.
Input
Output
Guides
The List Set Operations tool compares two text lists — one item per line — and computes their union, intersection, difference or symmetric difference, the same way you'd compare two mathematical sets.
How to use it
- Paste List A and List B, one item per line.
- Choose an operation:
- Union — every item that appears in either list, deduplicated.
- Intersection — items that appear in both lists.
- Difference (A − B) — items in A that are not in B.
- Difference (B − A) — items in B that are not in A.
- Symmetric Difference — items that appear in exactly one of the two lists.
- Optionally toggle case-sensitive comparison off to treat
Appleandappleas the same item. - Read the result and item count. Copy it or download it as a text file.
Blank lines are ignored on both sides, and each list is deduplicated before the operation runs — a repeated item in List A doesn't get counted twice.
What order does the result come in?
Union and intersection preserve List A's order first, then any new items from List B. Symmetric difference lists A's unique items followed by B's.
Can I compare lists that use different capitalization?
Yes — turn off "Case-sensitive comparison" and the tool compares items ignoring letter case, while still showing the result in its original casing from whichever list it came from.
Privacy
This tool runs entirely in your browser. Nothing you enter is uploaded, logged or stored.