Remove Duplicate Lines
Paste a list and get back each line once, in its original order.
Runs in your browser — nothing is uploaded
How to use Remove Duplicate Lines
- 1
Paste your list into Your lines, one item per line.
- 2
Tick Trim spaces around each line, Ignore case or Remove empty lines as needed.
- 3
Read how many duplicates were removed, then select Copy result.
About this tool
The tool reads your text line by line and keeps the first time each line appears, dropping every later copy. The order of the remaining lines does not change, so a list that was sorted stays sorted and a list in priority order keeps its priorities. If you also want the result sorted, run it through Sort Lines afterwards.
Two lines only count as duplicates when they match exactly, so the options matter. Trim spaces ignores spaces and tabs at the start and end of each line, which catches copies pasted from spreadsheets. Ignore case treats “Apple” and “apple” as the same line and keeps whichever came first. Remove empty lines deletes blank lines, including lines that contain only spaces.
The summary under the output tells you how many duplicates and empty lines were removed and how many lines remain. It is handy for cleaning email lists, keyword lists, log files or exported spreadsheet columns, and because the work happens in your browser the data never leaves your device.
Questions people ask
Does removing duplicates change the order of my lines?
No. The first copy of each line stays where it was and later copies are removed, so the original order is kept.
Can it ignore differences in capital letters?
Yes. Tick Ignore case and lines that differ only in capitalisation are treated as duplicates.
How do I remove duplicates in Excel or Google Sheets data?
Copy the column, paste it here, then copy the result back. Each cell becomes one line, so duplicates are removed the same way.
Is there a limit on how many lines I can paste?
There is no fixed limit; lists of hundreds of thousands of lines work on a normal computer.
Related tools
- Sort LinesSort a list alphabetically, numerically or by length as you paste it.
- Text ComparePaste two versions of a text and see exactly what was added and removed.
- Find and ReplaceReplace every match in a block of text, with plain text or regex.
- Word CounterCount words, characters, sentences and reading time as you type.
- Character CounterCount characters as you type and see how much room is left under a limit.
- Case ConverterChange text to upper, lower, title, sentence or programming case in one click.