About this duplicate line remover
This tool deletes lines that appear more than once, which is the quickest way to clean up an email list, a keyword list, a column copied from a spreadsheet, or a log file full of repeated messages. You decide which copy stays: the first, the last, or none at all, which leaves only lines that were unique from the start. Matching can ignore capital letters and spaces around each line, so "Apple" and " apple" count as the same line. Lines stay in their original order.
How to remove duplicate lines
- Paste your list. Put each item on its own line, or press an example. An example only fills the box.
- Choose the options. Pick which copy to keep, whether letter case and spaces matter, and whether blank lines stay.
- Press Remove duplicate lines. The unique lines appear below with the number of lines before and after.
- Copy or download. Press Copy lines, or Download to save the list as a text file.
Frequently asked questions
What is the difference between the three duplicate modes?
Keep the first copy leaves each line where it first appeared. Keep the last copy leaves it where it last appeared, which is useful when later entries are newer. Remove every repeated line deletes all copies of any line that appears twice or more, so only lines that were already unique remain.
Are "Apple" and "apple" duplicates?
Only when Ignore case is selected. The default is case-sensitive, so lines must match letter for letter, including capitals.
What does Trim spaces change?
Lines are compared without the spaces and tabs at their start and end, so "red" and " red" count as the same line. The kept lines are also written without those spaces.
Are blank lines treated as duplicates?
No. Blank lines are left in place so paragraphs and groups keep their spacing. Choose Remove blank lines to delete them all.
Does the order of my list change?
No. Lines are never sorted; only the extra copies are removed. To sort as well, run the result through Sort Lines Alphabetically.