← Back to DevKit

Set Operations

SET OPS · DATA & PROCESS

Treat lines of text as sets: intersection, union, difference, dedupe and duplicate detection at line level, with optional whitespace and case folding — compare two lists the easy way.

Set A
Set B
Result
Stats
Line-level comparison: each line is one element, with optional outer-space and case folding; "Duplicates" lists lines appearing more than once in A. Blank lines are not counted.

>_ USAGE GUIDE

Paste two blocks of text, one line per element, and the tool treats each line as a member of a set: it computes the intersection (in both), union (merged and deduped), difference (only on one side) and duplicates, with optional trimming and case folding. Reconciling two lists or diffing two log versions no longer needs a line-by-line eyeball pass.

Know what each operation answers. Intersection answers "what do both have" and is ideal for shared members across two lists. Difference answers "what does one side have extra" and helps locate rows that were added or dropped. Union merges both sides and removes repeats, while duplicates lists lines that appear more than once in list A, handy for spotting double entry. The ignore whitespace and ignore case toggles fold away "false differences" caused only by trailing spaces or casing, so one item is not misread as two.

  1. Paste list A: put the first block of text, one item per line, in the left box
  2. Paste list B: add the second block on the right, again one item per line
  3. Pick the operation: switch between intersection, union, difference and duplicates
  4. Toggle normalization: turn on ignore whitespace and ignore case when needed
  5. Review and copy: check the result, then copy the whole category back into your sheet

>_ FAQ

Q1 · When should I use intersection versus difference?

Intersection gives the members present on both sides and is used to find what two lists share. Difference gives the members on only one side and is used to spot rows a side added or missed. Union simply merges and dedupes the two sources.

Q2 · Do the ignore-case and ignore-whitespace options change the result?

Yes. Both normalize each line before comparing: ignore whitespace trims leading and trailing spaces (including invisible trailing tabs), and ignore case unifies letter case, so Alice and alice count as the same item. They affect only the comparison, never your pasted text.

Q3 · Can I compare two Excel lists, and how should I prepare the input?

Yes, but copy one column at a time and paste it in. Select a column in Excel and copy it; pasting gives this tool the one-item-per-line shape it expects. If the range has a header row, delete it first, otherwise it participates in the comparison as an ordinary element.

Q4 · How does this differ from the line-dedupe tool?

The line-dedupe tool works on a single block, cleaning it and removing repeats while keeping order. This tool works on two blocks and centers on intersection, difference and union. To dedupe one list, the line tools are more direct; to find what two lists share and where they differ, use this tool.

Q5 · Can it handle tens of thousands of lines, and does the order change?

It handles the common tens-of-thousands range. Results keep first-seen order so you can cross-check against the original; after normalization, if two lines differ only by case or whitespace, the first occurrence's spelling wins. For very large inputs, pre-filter each side first.

Embed code

Paste the code below into your page to embed this tool as an iframe (nav and footer auto-hidden).

Heightpx
This tool runs entirely in your browser — input never leaves your device. Press Ctrl K to switch tools anytime.