Remove Duplicate Lines
Remove duplicate lines from a list online: keep the first occurrence, ignore case or spacing if you like, and optionally sort the result. Free and private.
How to use Remove Duplicate Lines
- 1Paste your list with one item per line.
- 2Choose whether matching ignores case or surrounding spaces, and whether to sort.
- 3Copy the unique lines; the summary shows how many duplicates were removed and how many lines are left.
What makes it better
- Keeps the first occurrence in original order
- Case-sensitive or case-insensitive matching
- Option to ignore leading and trailing spaces
- Shows duplicates removed and unique lines left
About Remove Duplicate Lines
Remove Duplicate Lines keeps the first copy of every line and deletes the repeats, so a list of emails, URLs or keywords ends up with only unique entries. Matching is case-sensitive by default, and you can choose to ignore case, ignore leading and trailing spaces, or sort the result.
Common uses
- Deduplicate an email or mailing list before importing it.
- Clean a list of keywords, URLs or SKUs exported from several sources.
- Remove repeated lines in logs or configuration snippets.
- Get a unique, alphabetically sorted list in one step.
Example
Input
apple banana apple cherry banana date
Result
apple banana cherry date
Good to know
- Blank lines are never counted as duplicates; use Remove Empty Lines if you want those gone as well.
- Lines are compared as a whole, so “apple” and “apple pie” are different lines.
- Sorting uses your browser’s locale-aware alphabetical order, not a raw character code order.
Remove Duplicate Lines FAQ
How do I remove duplicate lines from a list?
Paste the list, one item per line. The first time a line appears it is kept and later copies are removed. The summary tells you how many duplicates were removed.
Is “Apple” the same as “apple”?
By default no, because matching is case-sensitive. Untick “Case sensitive” to treat them as the same line; the first spelling you typed is the one that stays.
Why does a line with a trailing space count as different?
Spaces are part of the line. Turn on “Ignore leading and trailing spaces” so “apple” and “apple ” are treated as duplicates.
Can I sort and deduplicate at the same time?
Yes. Choose “Sort A–Z” as the order and the unique lines come back alphabetically instead of in their original order.
Does the order of my lines change?
Not unless you pick sorting. Otherwise unique lines stay in the order they first appeared.