Remove Duplicate Lines
Paste a list and the tool will remove duplicate lines, keeping the first time each line appears and leaving the rest of the list in its original order. Options let you ignore case, trim spaces before comparing and remove empty lines. It also tells you how many duplicates were taken out.
Duplicates creep into email lists, keyword lists, product codes and anything merged from two sources. Unlike sorting with a unique option, this tool does not reorder anything, so a list that was in a meaningful order stays that way.
How to remove duplicate lines
- Paste your list into the box, one item per line.
- Tick ignore case, trim spaces or remove empty lines as needed.
- Check the number of duplicates removed.
- Copy the cleaned list.
Options that change which lines count as duplicates
By default two lines must match exactly. With ignore case on, Apple and apple are treated as the same line, and the first one you wrote is kept. With trim spaces on, a line with a stray space at the start or end matches the same line without it, which often happens with text copied from spreadsheets.
Remove empty lines drops blank lines altogether, which is useful when the list was pasted with gaps between items.
Frequently asked questions
Which copy of a duplicate is kept?
The first one. Later copies are removed and everything else keeps its position.
Does it sort my list?
No. The original order is kept. Use the sort lines tool if you also want it in order.
Can it treat Apple and apple as the same?
Yes. Turn on ignore case before removing duplicates.