Alphabetical, natural (file2 before file10) or by length, any language
Remove Duplicate Lines
Turn a list with repeats, such as emails, URLs or keywords, into one entry per line, in the original order.
Loading tool…
How to use remove duplicate lines
Paste the list or open a text file.
Choose whether to ignore case and spaces at the ends of lines.
Choose to keep the first or the last copy of each repeated line.
Copy or download the unique lines.
What this tool does
- Keeps the original order of the lines it keeps.
- Optionally treats "Apple" and "apple " as the same line.
- Keeps the first or the last copy; can leave blank lines alone.
- Reports how many lines were removed and which lines repeated most.
How the result is verified
The result is run through the same dedupe again and must come back unchanged, which proves no repeats are left under your rules.
Frequently asked questions
Does it keep the order?
Yes. Lines stay in the order they first appear (or last appear, if you choose to keep the last copy). Sort the result separately if you want it sorted.
Can it ignore case?
Yes. Turn on Ignore case and "Email@Site.com" and "email@site.com" are treated as one line; the copy that is kept keeps its own capitals.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Delete blank lines, or keep one between paragraphs
Count and remove repeated rows, by whole row or chosen columns
Hidden characters, spaces, blank lines and quotes cleaned in one pass
Lines, blank lines, unique lines and the longest line