Comparing two lists for matches means reading one item per line from each list and reporting the items that appear on both sides. A browser tool that follows this rule treats every non-blank trimmed line as a single member of its list, normalizes line endings to LF, strips surrounding whitespace, removes blank lines, and decides what counts as a match using a single case rule before it runs any math. The matches are then surfaced in a labeled In both panel, alongside four other views that put the matches in context without adding a separate workflow. That single pass matters when you have two long lists and need to act on the overlap quickly, whether you are reconciling inventory IDs, checking an email list against a sign-up sheet, or pulling the keywords that two campaigns share. The whole comparison happens locally, so neither list ever leaves the tab, and the first spelling you type in either box is the spelling the report shows for any item that survives deduplication.

What Counts as a Match in List Comparison
The "matches" view in list comparison is the intersection of the two sets. In set terminology, intersection contains every element that belongs to both sets and no element that belongs to only one. The operation names used here follow standard set meanings documented independently by MDN's JavaScript Set methods reference and Python's built-in set types, so the labels mean exactly what you would expect if you had ever written set(A) & set(B) in code.
Beyond the intersection, four other views help you interpret the matches. A-only contains items that appear in List A but not in List B, while B-only contains items that appear in List B but not in List A. Union contains every distinct item that appears in either or both lists. Symmetric difference, labeled Either not both in the report, contains the items that appear in exactly one list — which is the union minus the matches. Together these five panels answer most questions you might have after a match check, without requiring a second pass.
How to Compare Two Lists for Matches Step by Step
- Open Compare Two Lists in your browser.
- Paste one item per line into the List A textarea. Each non-blank trimmed line becomes one set member, so order within the box determines the report's display order.
- Paste one item per line into the List B textarea using the same rule.
- Choose whether letter case changes membership. Default is case-insensitive; switch to case-sensitive when Apple and apple must count as two separate items.
- Click Compare and wait for the five labeled panels to render. If either input exceeds 50,000 lines or one million UTF-16 code units, or both inputs normalize to empty, the tool returns an explicit error instead of partial results.
- Inspect the In both panel first — that is your matches view.
- Read Only in A and Only in B for the directional differences, then Union and Either not both for the combined views.
- Copy the labeled report and verify its literal line policy against the destination system before you treat the output as authoritative.
How Case Sensitivity Changes What Counts as a Match
Case sensitivity is the single most consequential choice when comparing two lists for matches, because the same letters with different cases are different strings in most downstream systems but the same string in others. The case rule is applied consistently to deduplication and all five operations, so flipping it changes every panel at once, not just the matches.
| Case mode | Input A | Input B | Match (In both) |
|---|---|---|---|
| Case-insensitive (default) | Apple | apple | apple (first spelling kept from A) |
| Case-sensitive | Apple | apple | — (no match) |
If Apple appears first in List A and apple appears first in List B, the case-insensitive match keeps the Apple spelling because the first displayed spelling wins. This first-spelling rule is also why two visually identical items in List A will not create a duplicate match entry; only the first occurrence in A contributes to the membership key.
Reading the Labeled Report Beyond the Match List
The report is a fixed block of five uppercase headings, LF-separated, in the order IN BOTH, ONLY IN A, ONLY IN B, UNION, EITHER NOT BOTH. Each heading is followed by the values that belong to that view, drawn from the same normalized arrays that feed the on-screen panels. An empty section contains an em dash so absence is visible at a glance instead of looking like a missing block.
| Section | Contains | Standard set name |
|---|---|---|
| In both | Items present in List A and List B | Intersection |
| Only in A | Items present only in List A | A minus B |
| Only in B | Items present only in List B | B minus A |
| Union | Items present in either or both lists | Union |
| Either not both | Items present in exactly one list | Symmetric difference |
The visible panels and the copied report use the same underlying arrays, so what you see is what you paste. Copy all results reports a clipboard success only after the browser confirms the write; if the clipboard write is denied, the tool returns a manual-copy instruction rather than silent success.
A Worked Example: Two Small Lists With One Match
Suppose List A contains apple, banana, pear and List B contains banana, peach. With default case-insensitive comparison, the tool normalizes both inputs, deduplicates within each list, and computes the five views.
- In both: banana (the single shared member)
- Only in A: apple, pear (in A's display order)
- Only in B: peach (B's single non-shared member)
- Union: apple, banana, pear, peach (A first, then new B members)
- Either not both: apple, pear, peach (union minus the match)
Union length is 3 from A plus 1 new from B, which is 4. Intersection length is 1. Symmetric difference length is 4 − 1, which is 3. Those relationships are general: the symmetric difference is always the union minus the intersection, and the union is always the intersection plus the symmetric difference.
Common Tasks Where Match Detection Helps
Match detection is the bottleneck in many list workflows. Reconciling an email list against a sign-up sheet, checking whether two CSV exports share a column of inventory IDs, finding the filenames a transfer would copy across two folders, and pulling the keywords two campaigns already share for a delta report all reduce to the same operation: read each list line by line, return the lines that appear on both sides. The Compare Two Lists tool handles each of these in the same pass, with the case rule you choose applied uniformly across deduplication and the five views.
Two additional use cases come up often. The first is allowlist checks: paste the allowlist in List A and the new entries in List B, then read Only in B to see which new entries are not yet allowed. The second is migration checks: paste the source identifiers in List A and the destination identifiers in List B, then read Only in B to see what has not yet landed, and Only in A to see what is still pending in the source. The match list itself, In both, tells you what has been confirmed in both places.
Limits, Edge Cases, and What the Tool Does Not Do
The tool compares literal line keys under the chosen case rule. It does not parse CSV, split commas, normalize Unicode, remove punctuation, compare numbers numerically, resolve URLs, or perform fuzzy matching. Whitespace inside a line is preserved after surrounding whitespace is trimmed, so a line of " apple " becomes the member "apple", but a line of "apple pie" stays "apple pie". One physical line is one literal item.
Each input is bounded by one million UTF-16 code units and 50,000 lines. These limits keep the comparison stable on modest hardware, and exceeding either returns an explicit error with no partial results. If both normalized lists are empty after blank-line removal, the tool returns the same error rather than rendering five empty sections. Editing either textarea clears the prior result, so always re-run after a paste correction.
Because every parse and comparison step happens locally, no input and no result is uploaded, stored, logged to a comparison service, or sent to an AI model. The tool is not a database join, a spreadsheet merger, a diff viewer, a fuzzy deduplicator, a security access-control validator, or a reconciliation service — it has no knowledge of aliases, equivalent domains, Unicode confusables, numeric ranges, or business identities. When a downstream system uses different normalization rules, review the case policy and the whitespace rule before treating a match list as authoritative.
For a deeper look, see Convert DOCX to DOC Free: A Local TXT Workflow.
For a deeper look, see Extract Numbers From Google Sheets Text in One Pass.