Skip to content
Convertto

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.

Runs in your browser
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 knowSet operationWhat comes back
What is in both listsIntersectionEvery item present in the first list and also in the second.
What is only in the firstDifferenceItems in the first list with no match in the second.
What is only in the secondDifference, reversedThe mirror of the row above.
What is in one list but not bothSymmetric differenceThe two difference sets joined: everything that failed to match.
Everything, once eachUnionBoth 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.

If the input is messy, remove duplicate lines and sort each list 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 instead: a diff cares about order and position, and a set comparison deliberately does not.

Frequently asked questions

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.

How to use the list comparison & set operations

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

Embed this tool

Put the working list comparison & set operations on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More text tools