Remove Duplicate Lines
Paste a list, one item per line, and drop the repeats. Keep the first copy, keep only unique lines, or show what was repeated.
Cleaning a list in a minute
- Copy your list in, one item to a line. A column pasted from Excel or Google Sheets arrives in exactly that shape.
- Choose what to keep. The default, First of each line, deletes later copies and leaves everything else in its original order.
- Set the three options to match your data. Untick Case sensitive if “Apple” and “apple” should count as the same, keep Trim spaces ticked so a stray space does not hide a duplicate, and tick Remove empty lines to tidy up blanks.
- The note under the result tells you how many lines were removed. Copy the clean list or download it as a .txt file.
How to remove duplicate lines from a list, keywords or emails
Duplicates sneak into lists everywhere. You merge two mailing lists and half the addresses appear twice. You export keywords from three tools and the same phrases come back with each one. You scrape a page and get the same URL on every row. Removing them by hand is slow and you will miss some, particularly in a list of a few thousand lines.
Here is what the tool does with each kind of list:
- Email lists: untick case sensitivity so
Sam@Example.comandsam@example.comare treated as one address, and keep trimming on for addresses with trailing spaces. - Keyword lists: run it on the combined export, then use the line sorter to put the clean list in alphabetical order.
- URLs: leave case sensitivity on, because paths on many servers are case sensitive.
- Product codes and IDs: keep both case sensitive and trim on to catch exact repeats only.
- Log files: use Only the repeated lines to see which messages are repeating before you decide what to do about them.
The three modes explained with an example
Take this list: red, blue, red, green, blue, yellow, one per line.
| Mode | Result | What it means |
|---|---|---|
| First of each line | red, blue, green, yellow | Each value appears once, in the order it first showed up |
| Only lines that appear once | green, yellow | Anything that had a duplicate is dropped entirely, including its first copy |
| Only the repeated lines | red, blue | Shows which values were duplicated, each listed once |
The first mode is what most people want. The second is useful when you are looking for items that exist in only one place, such as customers who appear in a single mailing list. The third answers the question “what exactly was repeated?” without making you read the whole list.
Remove duplicates from an Excel or Google Sheets column
Spreadsheets have their own duplicate remover, but a text tool is often faster for one-off jobs, especially when the data is not in a spreadsheet yet. Copy the column, paste it here, and copy the cleaned result back. Because each cell becomes one line, the order and content are preserved.
If your cells contain line breaks inside them, the tool will see each internal line separately. In that case, clean the data in the spreadsheet itself, or replace those internal breaks first with the find and replace tool.
Why duplicates are sometimes missed
If two lines look identical but are not removed, something invisible differs between them. The usual culprits are trailing spaces, a different capital letter, a non-breaking space copied from a web page or a tab character instead of a space. Switching on Trim spaces and turning off Case sensitive fixes most of these. For stubborn cases, run the text through the extra space remover first so that all the whitespace is normalised, then deduplicate.
The tool compares lines exactly, so it will not merge lines that are merely similar, like “colour” and “color” or a URL with and without a trailing slash. If you need that kind of cleaning, normalise the text first and then remove duplicates.
About removing duplicates
How do I remove duplicate lines from a text file?
Open the file, copy everything, paste it into the box above and copy the result back. The first occurrence of every line is kept and the rest are removed.
Does removing duplicates change the order of my list?
No. In the default mode every remaining line stays in its original position. If you want alphabetical order, use the line sorter afterwards.
How do I make it ignore uppercase and lowercase?
Untick Case sensitive. Lines that differ only in capital letters are then treated as duplicates, and the first version you wrote is the one kept.
Can it remove duplicate words instead of whole lines?
It works on lines. To deduplicate words, first put each word on its own line using the find and replace tool (replace a space with \n), then run this tool.
What is the maximum number of lines?
There is no fixed limit. Very large lists may be slow on older devices.
Next steps once your list is clean
With the repeats gone, the line sorter will put the list in alphabetical order, and extra space remover catches the stray spaces that make lines look different when they are not. To confirm what the cleanup removed, paste the before and after into text compare, or use the word counter to see how many items remain.