Dedupe a list in seconds
Lists collect doubles. You merge two newsletter exports and half the emails appear twice. You copy keywords from three reports, combine tags from several posts or paste product codes from a spreadsheet, and the same entries show up again and again. Finding them by eye is slow and easy to get wrong. This tool reads your list line by line, keeps each line once and tells you how many duplicates it removed.
It works for anything with one item per line: email addresses, URLs, names, keywords, file names, IDs, log lines or rows copied from a single spreadsheet column.
How lines are compared
Two lines count as duplicates when they are exactly the same after the comparison rules you pick:
- Case sensitive treats "Paris" and "paris" as different lines. Turn it off for domains and most word lists, where capital letters do not change the meaning, and usually for email addresses: the email standard (RFC 5321) lets the part before the @ be case sensitive but discourages relying on it.
- Trim whitespace before comparing ignores spaces and tabs at the start and end of a line. Copied data often carries a stray space you cannot see, and without this option it would hide a duplicate.
- Remove empty lines drops blank lines. When it is off, blank lines stay where they are and are never treated as duplicates, so paragraphs or groups in your list keep their spacing.
The rules only affect the comparison. The line you keep is copied to the result exactly as you typed it.
Each line once, only duplicates or only unique lines
Take this list of five lines: apple, pear, apple, plum, pear.
- Each line once gives apple, pear, plum, with 2 duplicates removed.
- Only duplicates gives apple, pear: the lines that were repeated, one copy each.
- Only unique lines gives plum, the only line that appears exactly once.
Keep First copy or Last copy decides which occurrence of a repeated line stays, and so where it sits in the result. Last copy is useful for logs and exports where a later entry replaces an earlier one. The list of most repeated lines below the result shows the count for each line that appeared more than once, so you can see where the doubles came from. To count single words in running text rather than whole lines, use the word frequency counter.
Sorting the result
Original order keeps your list as it was. A to Z and Z to A sort alphabetically and ignore capital letters. Numbers sorts the way people count, so item 2 comes before item 10, where a plain alphabetical sort would put item 10 first. Sorting also leaves out empty lines. To sort by length, reverse or shuffle a list, use sort lines.
How to use the duplicate line remover
- 1Paste your list into the left box, one item per line, or press Example to try a messy list of emails.
- 2Set the comparison rules. For emails, turn Case sensitive off so the same address in different spellings counts once.
- 3Choose which copy to keep and how to sort, check the line counts, then copy the result or download it as a .txt file.
Guide on this topic
Frequently asked questions
Does it keep the original order of my list?
Yes. With Sort set to Original order, every line stays where it was and only the repeated copies disappear. Pick A to Z, Z to A or Numbers if you want the unique lines sorted instead.
Why are "Anna@example.com" and "anna@example.com" both still there?
Case sensitive is on, so lines that differ only in capital letters count as different. Turn it off to treat them as the same line. The copy that stays keeps its own spelling.
What does Trim whitespace before comparing do?
It ignores spaces and tabs at the start and end of a line when lines are compared, so "ben@example.com" and "ben@example.com " with a trailing space count as duplicates. The line that is kept is not changed.
What is the difference between Only duplicates and Only unique lines?
Only duplicates lists each line that appears more than once, one copy each, which is handy for finding double entries. Only unique lines lists the lines that appear exactly once and leaves out everything that was repeated.
Is there a limit on how many lines I can paste?
There is no fixed limit. Lists with tens of thousands of lines are processed in your browser in a moment. Nothing is uploaded, so you can safely clean customer or email lists.