# List Comparison & Set Operations

> Find items in both lists, in one only, or combined — union, intersection and difference.

Comparing two lists means answering four questions: what is in both, what is only in the first, what is only in the second, and what does the combined set look like. Paste one item per line and get all four at once, plus counts of duplicates within each list.

**URL:** https://convertto.tech/t/list-comparison
**Category:** Text Tools (https://convertto.tech/c/text-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## The four questions a list comparison answers

Comparing two lists is set arithmetic wearing plain clothes. Whatever the task is called in the office, it resolves to one of five operations, and the default view runs four of them at once so you do not have to decide up front which one you needed.

| What you want to know | Set operation | What comes back |
| --- | --- | --- |
| What is in both lists | Intersection | Every item present in the first list and also in the second. |
| What is only in the first | Difference | Items in the first list with no match in the second. |
| What is only in the second | Difference, reversed | The mirror of the row above. |
| What is in one list but not both | Symmetric difference | The two difference sets joined: everything that failed to match. |
| Everything, once each | Union | Both lists merged with repeats collapsed. |

## The settings that change the answer

- Case sensitivity is off by default, so `Alice` and `alice` count as one item. Turn it on for identifiers, tokens and paths on a case-sensitive filesystem, where the difference is real.
- Whitespace is trimmed by default. A trailing space is the single most common reason two lists that look identical share nothing at all: it survives a copy out of a spreadsheet cell and it is invisible on screen.
- Repeats inside one list are collapsed in the results but counted separately in the summary, so you can see that the first list had 412 rows and 398 distinct values without leaving the page.
- Sorting applies to the output only, using a numeric-aware comparison, so `item2` lands before `item10` instead of after it.
- Blank lines are dropped, which means a trailing newline at the end of a paste does not turn into an empty item that matches nothing.

## What people actually use it for

- Reconciling two exports: who is in the CRM but not on the mailing list, or which SKUs the supplier sent that the catalogue has never heard of.
- Seeing what a change touched: two lists of config keys, environment variables or file paths, before and after.
- Skipping work already done: put the processed identifiers in the second list and take **only in the first**.
- Measuring overlap before merging two audiences, tag sets or keyword lists, where the intersection count is the answer on its own.

> **Both lists stay on your machine** — The comparison runs in the page, which matters because the two lists are usually customer emails, account numbers or internal identifiers. Nothing is uploaded and nothing is logged.

If the input is messy, [remove duplicate lines](https://convertto.tech/t/remove-duplicate-lines) and [sort each list](https://convertto.tech/t/line-sorter) first so the output is easier to read. And if you are comparing two versions of the same text rather than two sets of items, use [the diff checker](https://convertto.tech/t/diff-checker) instead: a diff cares about order and position, and a set comparison deliberately does not.

## How to use

1. Enter or paste your first list.
2. Enter or paste your second list.
3. Choose the show.
4. Turn "Case sensitive" on or off as needed.
5. Turn "Trim whitespace" on or off as needed.
6. Turn "Sort results" on or off as needed.
7. The result appears immediately — copy or download it.

## FAQ

### What is the difference between union and intersection?

The union is everything from both lists with duplicates removed; the intersection is only what appears in both. Between them they answer "what do I have in total" and "what do we agree on".

### Why does it report duplicates within a list separately?

Because a list that contains the same value twice usually indicates a problem upstream — a bad export or a failed deduplication. Silently collapsing them would hide that, so the count is reported alongside the comparison.

## Related tools

- [Text Similarity Checker](https://convertto.tech/t/text-similarity-checker): Compare two texts with Levenshtein distance, Jaccard, cosine and Dice coefficients.
- [Columns to Lines Converter](https://convertto.tech/t/columns-to-lines): Switch between a delimited single line and one item per line, in either direction.
- [Line Sorter](https://convertto.tech/t/line-sorter): Sort lines alphabetically, numerically, by length or in reverse — with natural-order support.
- [List Randomizer & Shuffler](https://convertto.tech/t/list-randomizer): Shuffle a list into random order — for draws, pairings, running orders and sampling.
- [Remove Duplicate Lines](https://convertto.tech/t/remove-duplicate-lines): Delete repeated lines from a list, keeping the first occurrence of each unique line.
- [Compare Two PDFs](https://convertto.tech/t/compare-pdfs): See two versions side by side, overlaid or wiped between — with every changed area outlined.
- [CSV Duplicate Remover](https://convertto.tech/t/csv-deduplicator): Remove duplicate rows from a CSV, matching on every column or just a key you choose.
- [Date Difference Calculator](https://convertto.tech/t/date-difference-calculator): Count the days, weeks, months and working days between two dates.
