Compare Two Lists

Find matches, differences, and unique items across two lists

Use the interactive tool with JavaScript enabled.

How to use it

  1. Paste one item per line into List A and List B, or open local text files up to 10 MB each.
  2. Choose whether to trim surrounding spaces and ignore case.
  3. Select shared items, items only in A, items only in B, or all unique items. Copy or download the selected result.

Example

Input

List A: apple, pear, lime
List B: pear, lime, fig

Output

In both: pear, lime
Only in A: apple
Only in B: fig

Behavior and limits

This is exact text comparison, not fuzzy matching. Duplicate entries are collapsed, blank lines are ignored, and results retain their first-seen order. Local text files are treated as one item per line, not as multi-column CSV.

About this tool

Paste two newline-separated lists to find their intersection, items unique to either list, or their combined unique values. Use it to compare deployment names, identifiers, filenames, or test data. Duplicate items are collapsed; results preserve their first-seen order. With case matching disabled, shared items use the spelling from list A.

Questions and answers

Are blank lines included?
No. Empty and whitespace-only lines are ignored. The trim option controls whether surrounding spaces on nonblank items affect comparison.

Related tools

  • Line Tools — Sort, deduplicate, number, shuffle, and filter lines
  • Text Diff — Compare two text blocks line by line
  • CSV Tools — Validate, reformat, and compare CSV files — delimiter, qualifier, sort, diff

Tool processing runs in your browser. Privacy policy and cookie preferences.

Read this guide as Markdown