Remove repeated lines from a list while keeping the original order, with options for case, surrounding spaces, and whether to keep the first or last copy. Shows which lines were repeated and how often. Everything runs in your browser.
Show calculation steps
Processed privately in your browser β nothing you paste is uploaded, logged or stored.
How to use the Duplicate Line Remover
- Paste your list into the input panel β one item per line.
- Choose whether to ignore letter case and whether to ignore spaces around each line.
- Choose which copy to keep when a line repeats: the first or the last.
- Click Remove duplicates, then copy the cleaned list or download it as a .txt file.
Frequently asked questions
Does removing duplicates reorder my list?
No. The surviving copy of each line stays exactly where it was, so a list you had already put in a deliberate order keeps that order. Tools that sort as a side effect of de-duplicating destroy information you had, which is why this one does not.
What counts as a duplicate?
By default two lines are duplicates only if they match character for character. Turning off case sensitivity makes Apple and apple the same line, and trimming makes a line with trailing spaces the same as one without.
Why did nothing happen to a list I know has repeats?
Almost always invisible whitespace. Text copied from a spreadsheet or a PDF often carries trailing spaces, so "apple " and "apple" are genuinely different lines. Turn on trimming and they will match.
Does it handle text pasted from Windows?
Yes. Windows line endings are carriage return plus line feed, and splitting on the line feed alone leaves an invisible carriage return on the end of every line β which is why some tools appear to do nothing. Both endings are normalised before comparison.
What is the difference between keeping the first and the last copy?
Keep first preserves the earliest occurrence, which suits a list where the first entry is the canonical one. Keep last preserves the most recent, which suits an append-only log. Either way the survivor stays in the position it occupied.
Can I see which lines were duplicated rather than remove them?
Yes. The tool reports how many lines were removed and how many remain, and lists the repeated lines with the number of times each appeared, which is often more useful than the cleaned list when you are auditing data.
Is there a size limit?
Nothing is uploaded, so the limit is your own device rather than a server quota. Lists of tens of thousands of lines are processed in well under a second; very large pastes are warned about before they can make the page unresponsive.