List Compare

Compare two or more lists for their intersection, union, symmetric difference and what's only in each — split on any separator, sort, and download results.

You can also drop a text file or a spreadsheet onto a list.

Try one:
Intersection (in both) (0 items)
Only in A (0 items)
Only in B (0 items)
Union (all unique) (0 items)
Symmetric difference (0 items)

Two lists, five set relations

Paste two lists — one item per line, or split on a comma, semicolon, tab, space or a character of your own with "Split items on" — and List Compare treats each as a set of items and shows every set relationship at once: the intersection (items in both), only in A, only in B, the union of all unique items, and the symmetric difference (items in exactly one list). Each result section has a live count, a one-click Copy button and a Download button that saves it as a .txt file, and "Sort results" can put every section A → Z, Z → A or in number order. "Letter case in results" keeps every result as entered or writes it in UPPERCASE, lowercase or Capitalize Each Word, and each result’s "To List A" and "To List B" buttons put it back into a list box, one item per line, to compare it again. Duplicate lines inside a list are collapsed so the comparison is by membership, not by how many times an item is repeated. "Add a list" brings in List C, D and E: with three or more, the answers become "In every list", "Only in A", "Only in B" and so on, the union, and "In exactly one list". A text file dropped onto any list box fills that box, read the way the open-file button reads one. A spreadsheet (.xlsx, .xls or .ods) dropped on a box, or opened with that box’s “Open spreadsheet…” button, fills it from one column of one sheet, and the sheet, the column and whether the first row is a header are chosen under the box; “Download all results (.xlsx)” saves every result as one sheet, a column each. “Try one:” loads two worked examples — the same items spelled differently, and IDs from two exports that differ by a prefix and leading zeros — and ticks the options each one needs, so unticking one shows which items it was matching.

Trim and case options

Turn on trim whitespace to ignore leading and trailing spaces when matching, and ignore case to treat Apple and apple as the same item — in both cases the original text of the first occurrence is what appears in the results. Ignore extra spaces matches a name typed with a double space to the same name with one, and ignore leading zeros matches 007 to 7. Blank lines are ignored, and everything runs locally in your browser, so even long or confidential lists never leave your device. Need a line-by-line, position-aware comparison instead? Use the text diff tool.

Frequently asked questions

How is this different from a text diff?

A text diff compares two blocks line by line in order and highlights what changed at each position. List Compare ignores order and repetition: it treats each list as a set and answers which items are in both, only in A, only in B, or either — the classic set operations.

Does it ignore case, extra spaces, and blank lines?

Blank and whitespace-only lines are always ignored. Turn on "ignore case" to match items regardless of capitalization and "trim whitespace" to ignore surrounding spaces. The original text of the first matching line is always what is shown and copied.

Can I compare more than two lists?

Yes. "Add a list" adds List C, then D and E, each with its own paste and open-file buttons, and the last one can be removed again. With three or more lists the answers are "In every list", "Only in A", "Only in B" and so on for each list, "Union (all unique)" and "In exactly one list", each with its count, Copy and Download. With two lists the page is the familiar two-list comparison, with a Venn diagram of how many items are only in A, in both and only in B, and the Jaccard similarity beside it.

Can I tidy a list before comparing, or get the results as SQL or JSON?

Yes. Under each list, “Remove duplicates” and “Sort A → Z” rewrite that box in place, and “Swap A and B” exchanges the two. “Before comparing, replace … with …” runs one find-and-replace over every item before matching — tick “Regular expression” for a pattern, which is refused in words if it could freeze the page — so SKU-1 can match 1 while the results still show each item as you entered it. “Write results as” turns every result into one per line (the default), a numbered list, Markdown bullets, comma-separated, quoted for SQL IN, a JSON array or an HTML <ul>, and Copy and Download follow it.

Can I drop a file on a list, change the letter case of the results, or compare a result again?

Yes. A text file dropped onto any list box fills that box, read the way the open-file button reads one, and a file that is not text is refused with a note. “Letter case in results” keeps every result as entered, the default, or writes it in UPPERCASE, lowercase or Capitalize Each Word, and Copy and Download follow it. Every result has “To List A” and “To List B” buttons that put it into that list box one item per line, so the result of A against B can be compared with another list in one click.

Can I compare a column of a spreadsheet, or save the results as one?

Yes. Drop an .xlsx, .xls or .ods file onto a list box, or use that box’s “Open spreadsheet…” button, and the box fills from the first sheet’s first column, below its header row. “Sheet”, “Column” and “First row is a header” under the box change which cells are read, and each change refills the box. A cell is read as its value, so a number formatted to show leading zeros is read without them; tick “Ignore leading zeros” to match it anyway. A workbook locked with a password is refused with a note that says so. “Download all results (.xlsx)” saves every result as one sheet, a column each headed by its name, in the order and letter case the boxes show.