Skip to content
AZ Tools

List Compare — Intersection, Union & Difference

Compare two lists line by line: find common items, items unique to each, union or symmetric difference — in your browser.

Result

A: 4 · B: 4 · Result: 2

How to use

  1. Paste one list into A and the other into B, one item per line.
  2. Choose a comparison mode (in both, only A, only B, union, only one).
  3. Toggle case sensitivity or trimming, then copy the result.

About this tool

Show

Paste two lists and see how they relate: the items in both, the ones only in the first, the ones only in the second, the union, or the entries that appear in exactly one of them. Comparison is per line, with optional trimming so a stray space at the end of a copied cell does not make two identical values look different, and optional case sensitivity for when it genuinely matters. Duplicates inside a single list collapse, and the first spelling you used is the one shown, so a list pasted from a spreadsheet keeps its original capitalisation in the output even when matching ignores case. Good for reconciling two exports, checking which users are missing from a group, or diffing a package list. Everything runs locally.

Frequently asked questions

Are duplicate lines counted?

No. Each list is de-duplicated first, so an item that appears multiple times in a list is treated as one. The item counts shown reflect the unique items in each list.

What does 'only in one list' mean?

It is the symmetric difference: every item that is in exactly one of the two lists (the items only in A plus the items only in B), excluding anything they share.

How does case sensitivity work?

When off (the default), Apple and apple are treated as the same item. Turn it on to compare exactly, including letter case.

Is my data sent anywhere?

No. The comparison happens entirely in your browser; nothing is uploaded.

Which spelling is shown when case is ignored?

The first one encountered in that list. Matching lowercases both sides to decide whether two entries are the same, but the output keeps the original text, so a list pasted from a spreadsheet comes back with its capitalisation intact rather than flattened.

Why does an item I can see in both lists show as only in one?

Almost always invisible whitespace — a trailing space from a copied cell, or a non-breaking space that a web page used instead of a normal one. Turn trimming on for the first case. For the second, the character is genuinely different, so it has to be replaced in the source.

Related tools