Set Operations

Input A

0 items

Input B

0 items

Result

0 items
Result will appear here.

Set Operations Tool

Perform mathematical set operations on lists and arrays. Combine, intersect, or subtract elements with flexible separators and comparison options.

Features

Union Operation

Combine two lists into one, removing duplicates while preserving order

Intersection Operation

Find common elements between two lists with flexible comparison options

Subtraction Operation

Remove elements of one list from another in either direction (A-B or B-A)

Multiple Separators

Support for space, comma, semicolon, colon, and newline delimiters

Deduplication

Automatically remove duplicate items from results with preserve-order option

Case-Insensitive

Compare items ignoring case sensitivity for flexible matching

Quick Copy

One-click copying of results in your preferred format

Dark Mode

Comfortable dark theme for extended usage

Use Cases

Finding common users between multiple subscriber lists
Removing blocked items from a main list of products
Merging multiple API response arrays into one dataset
Comparing employee lists across different departments
Filtering tags or categories by intersection with multiple sources
Data cleanup and deduplication from imported lists
Testing set operations in development and debugging
Educational purposes for learning set theory concepts

Frequently Asked Questions

What is the difference between union and intersection?
Union combines all items from both lists (removing duplicates). Intersection returns only items that appear in both lists.
How does the subtract operation work?
Subtract removes items found in one list from the other. Use A-B to remove B items from A, or B-A to remove A items from B.
What separators are supported?
The tool supports space, comma, semicolon, colon, and newline as input/output separators for flexible data formatting.
Does case sensitivity matter?
By default, the tool is case-insensitive for matching. You can enable case-sensitive comparison through the options.
What does "preserve order" do?
When enabled, the result maintains the original order of items from the input lists, useful for ordered datasets.
Can I sort the results?
Yes, the tool has a "Sort result" option that alphabetically orders the output for consistent, sorted lists.
What does trim do?
Trim removes leading and trailing whitespace from each item, ensuring clean data without extra spaces.
Can I use large lists?
Yes, the tool can handle large lists efficiently. Simply paste your data and perform the desired set operation.