List Union (Merge & Dedupe)
Combine two lists into one and automatically remove duplicates. Free online list union calculator. Fast, client-side processing.
Why Use the List Union Tool?
Merging lists while maintaining data integrity requires careful deduplication. Our List Union Tool combines two lists and automatically removes duplicate entries, giving you a clean merged result with statistics about duplicates removed.
Key Features
- Merge two lists preserving first occurrence order
- Automatic deduplication with count statistics
- Shows total items, unique count, and duplicates removed
- One-click copy of the merged result
How to Use
- Paste your first list in the List A textarea
- Paste your second list in the List B textarea
- View the merged and deduplicated result instantly
Technical Details
The union operation iterates through both lists in order, tracking seen items with a Set. Items from List A appear first in the result, followed by unique items from List B. This preserves insertion order while ensuring no duplicates. Time complexity is O(n+m).
FAQ
Which occurrence is kept when there are duplicates?
The first occurrence is always kept. Items from List A appear first, then unique items from List B.
Is the merge case-sensitive?
Yes, by default 'Apple' and 'apple' are treated as different items. Both will appear in the union result.
Related tools
Compare Two Lists / Arrays
Compare two lists and find items unique to each, plus common items
List Randomizer / Shuffle
Shuffle and randomize list items using the Fisher-Yates algorithm
List Intersection (Common Items)
Find common items between two lists with case-sensitive toggle
List Difference (A − B)
Find items in List A that are not in List B (set difference)
Remove Empty Lines
Remove empty and blank lines from text instantly
Add Line Numbers
Add line numbers to text with customizable start number, separator, and padding