Compare lists

Find common items, differences and the union of two lists.

Your files are processed here, on your device

We do not send your file or text contents to a processing server. No account is needed and there is no daily operation quota. Individual tools have size limits to protect your device’s memory.

A connection is needed to load the site and its resources. Hosting may receive technical visit data. Favorites store only tool identifiers in this browser.

How we handle your data →

How to use this tool

  1. Paste one item per line in A and B.
  2. Choose intersection, only A, only B or union and review comparison options.
  3. Apply and inspect item count before copying or downloading.

An example you can verify

Compare two lists while retaining first-occurrence order.

Example input

A: Ana, Luis, Ana (one entry per line). B: Luis, Marta.

SettingsOperation: common items. Case sensitive. Trim surrounding whitespace.

Expected result

Luis

Intersection contains only Luis. Union produces Ana, Luis, Marta. Only in A returns Ana and only in B returns Marta.

Compare lists: uses and practical guidance

Comparing lists answers different questions using the same data. Common items locate matches between inventories; only in A finds entries absent from B; only in B answers the reverse question. Union brings both sets together without repeated entries. Identify what each field represents before selecting an operation. If A is the previous inventory and B is the current one, only in A identifies removals and only in B identifies additions. Exchanging the lists changes those two results but does not change which entries belong to their intersection.

Each line is treated as one complete item. A row containing two comma-separated names remains a single entry, so prepare a CSV table before comparing it as a list. Blank lines are ignored. Duplicates are removed according to the selected options, retaining the first occurrence and its spelling. When letter case is ignored, Ana and ANA represent the same item; the result retains whichever spelling appeared first. This does not remove accents or apply phonetic equivalence: Jose and José remain different. Numeric codes are compared as text rather than numeric values, meaning 001 differs from 1.

Trimming whitespace makes an entry surrounded by spaces equivalent to the same text without those outer spaces. Internal spacing is retained, so two words separated by one space remain distinct from two words separated by two spaces. For copied data, inspect representative rows and decide whether spacing is part of the identifier. Disable trimming when that spacing is meaningful. The comparison does not infer that differently named people or products are equivalent. It reports exact matches under visible, reproducible rules, making the selected options part of the interpretation rather than silently cleaning every difference.

An empty result can be correct. Lists with no shared entries have an empty intersection, while only in A is empty when all its items appear in B. Review the operation and worked example before treating zero items as failure. Retain the original lists to repeat the comparison and save output before clearing the page. Each field accepts one million characters and up to ten thousand nonempty lines. If a large inventory is split into sections, remember that comparing isolated pieces can miss matches located in another section. Use corresponding partitions in both lists, or prepare a smaller complete inventory that still covers the comparison you intend.

Settings and limits

Paste one item per line in each list and choose an operation. Blank lines are ignored and the first occurrence of each item is retained. Optionally ignore letter case and trim surrounding whitespace. Maximum 10,000 lines per list and 1 million characters per field.

Frequently asked questions

Are repeated entries preserved?

No. Results contain unique items, preserving the order and spelling of each first occurrence.

Guides