Find unique lines (in A but not in B)

Find unique lines returns every line in text A that does not appear in text B. Paste both lists into the input pane separated by a line of ---; the tool loads text B into a set, walks text A, and keeps any line not present in the set. Order follows text A. The match runs in your browser; nothing uploads. For overlap see find common lines.

Input
Line 1:1 LF cloud_done Saved locally
Result Find Unique Lines
0 lines 0 chars

Set difference on lines

Find unique lines computes the set difference A − B. The split point is a line containing exactly ---. Lines from text B are loaded into a JavaScript Set, then text A is walked line by line; any line that is not in the set is emitted to the output. The result is "what is in A that is missing from B".

Matching is exact: case, whitespace, and trailing spaces all count. Hello and hello are treated as different lines. If you want case-insensitive matching, lowercase both sides first with lowercase; if trailing whitespace is causing false positives, pre-clean with trim whitespace.

Output preserves the order in text A. The mirror operation is find additions, which returns lines in B but not A. For the symmetric diff (lines in only one side, regardless of which) run unique lines once each way and combine the outputs.

How to use find unique lines (in a but not in b)

  1. 1Paste list A into the input panel, then a line with ---, then list B.
  2. 2The output panel lists every entry from A that does not appear in B, in A's order.
  3. 3Click Copy to copy the unique-line list, or Download to save it.
  4. 4Swap A and B around the separator to find unique entries on the other side, or use find additions.
  5. 5Pre-clean with trim whitespace when trailing spaces are causing spurious matches.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

How the difference works

Set difference A minus B

Lines from text B are stored in a JavaScript Set for O(1) lookup. Text A is walked line by line and any entry not in the set is emitted.

Order preserved from text A

Output follows the original order in A. Duplicates in A are kept; if foo appears twice in A and never in B, it appears twice in the output.

Exact, case-sensitive match

Comparison is byte-for-byte. Hello is different from hello, and trailing spaces matter. Lowercase or trim first if you need looser matching.

Mirror of find-additions

Find unique lines is A − B. Find additions is B − A, the reverse direction. Swap the halves around --- to flip the result.

Three-hyphen separator

The split between A and B is a line containing exactly ---. The separator line itself is not part of either set.

Worked example

Only apple is in A and missing from B. banana and cherry appear in both, so they are excluded. date is in B only and would only show via find additions.

Input
apple
banana
cherry
---
banana
cherry
date
Output
apple

Settings reference

Behaviour Effect on output
Separator A line containing exactly --- splits text A from text B.
Match rule Exact string equality, case and whitespace sensitive.
Order Follows text A.
Duplicates in A Preserved if not present in B.
Mirror operation find additions returns B − A.
Trailing whitespace Significant. Strip first with trim whitespace if needed.
Missing separator Output prompts for two halves split by ---.

FAQ

How do I get the entries unique to text B instead?
Either swap A and B around the --- separator, or pivot to find additions, which returns B − A directly.
Are matches case sensitive?
Yes. Lowercase both sides first with lowercase for case-folded comparison.
Why is my "unique" line actually in B as well?
Trailing whitespace or a different line ending. Run both sides through trim whitespace first.
Will duplicate lines appear more than once?
Yes, if a line repeats in A and is missing from B. Collapse with remove duplicate lines if you want one entry per unique value.
Is the result returned in any sorted order?
No. Output preserves the order in A. Paste it into a sort tool afterwards if you need it ordered.