Set difference with A's duplicates preserved
The op walks every item of List A in order and emits it unless its value appears anywhere in List B. Membership in B is checked via a Set built from B's items - not a count-based comparison, so B's internal duplicates are irrelevant.
Case sensitive off (default) means `Apple` in A matches `apple` in B and gets removed. Toggle on for exact-case matching. No trim option - whitespace differences are preserved on both sides.
Not commutative - swap the two blocks to compute `B - A` instead. For the symmetric difference (items unique to EITHER list), use Compare two lists in tagged mode.
How to use subtract one list from another
- 1Input your first list
- 2Input your second list
- 3Toggle 'Case sensitive' if needed
- 4Observe the live output update
- 5Copy or download the result
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this tool actually does
One-way set subtraction: `A \ B` with A's order preserved.
Order-preserving filter
Walks List A in order; emits each item unless its value appears anywhere in List B. No sorting. Line-for-line faithful to A's layout.
Keeps A's internal duplicates
If `apple` appears twice in A and not in B, both copies survive. Duplicate-awareness is about matching against B, not deduping A. To dedupe, chain Dedupe.
Case-insensitive by default
`Apple` in A matches `apple` in B and gets removed. Toggle Case sensitive on for exact matching.
B is a filter set, not a deletion count
If B contains `apple` once and A contains `apple` three times, all three are removed (not just one). Comparison is set-membership.
Not commutative
`A - B` differs from `B - A`. Swap the blocks to get the other direction, or use Compare two lists with Only in B mode.
Worked example
Subtract items from one list using default settings.
# List 1 apple banana orange # List 2 banana orange
apple
Settings reference
Understand how each option affects the output using the sample above.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Case sensitive: off (default) | `Apple` in A matches `apple` in B | Sample is all lowercase - output `apple` (banana + orange removed) |
| Case sensitive: on | Exact-case membership check | If A had `Banana` and B had `banana`, `Banana` would survive |
| Single block (no `# List` header) | Returns empty output | Status bar: "Paste two lists separated by `# List X` headers" |
| B is empty, A has items | Nothing to subtract - A emitted unchanged | A's order and duplicates preserved |