Remove duplicate lines from a list, keep the first of each, ignore case or spaces, and sort A-Z or naturally
Paste a list and keep one of each line, in its original order or sorted, with counts of what was removed.
How to use it
Paste the list, one item a line, or open a text, CSV or log file. Choose whether case and spaces count, and the order you want. Copy or download the unique lines.
Examples
A list of email addresses with repeats
alice@example.com bob@example.com alice@example.com carol@example.com bob@example.com
alice@example.com bob@example.com carol@example.com
Each address is kept where it first appeared; 2 duplicates removed.
Ignore case, then sort A → Z
Banana apple BANANA cherry Apple
apple Banana cherry
With Ignore case on, the first spelling met is the one kept.
Natural order for numbered names
file10.txt file2.txt file1.txt file2.txt
file1.txt file2.txt file10.txt
A → Z would put file10 before file2; Natural reads the numbers.
What it keeps and what it drops
Which setting to pick
| Order | What it does | Use it for |
|---|---|---|
Original order | Keeps lines where they first appeared | Logs, steps, anything whose order matters |
A → Z, Z → A | Dictionary order: apple, Banana, cherry | Names, words, tags |
Natural (2 before 10) | Reads numbers in a line as numbers: file2, file10 | File names, versions, numbered items |
Shortest first | By length; lines of the same length keep their order | Spotting stray short or long entries |
Questions
- Which copy of a duplicate line is kept?
The first one. Later copies are removed and the kept line stays in its place, unless you choose a sorted order. With Ignore case on, the kept line keeps the case it was written in the first time. - How many lines can it handle?
The page stays responsive while it works because the work runs in the background of your browser. Files over 10 MB are not read. - Can it remove duplicate words instead of lines?
It compares whole lines. To dedupe words, put one word on each line first, for example with your editor’s find and replace (a space to a new line). - Is my list uploaded?
No. Everything runs in your browser, so your text stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first.