About the Duplicate Line Remover
Paste a list and every repeated line is deleted. The first time each line appears is the copy that stays, and the rest of the list keeps its original order. Email lists, keyword lists, product SKUs, URLs, log lines and names copied from a spreadsheet are the usual candidates.
Since nothing is reordered, a ranked or sorted list keeps its sequence after the repeats are gone. The unique lines appear in the Result box as you paste, ready to copy back into Excel, Google Sheets, a CSV or a code editor.
How duplicate lines are found
The text is split into lines at each line break. Working from the top down, each line is added to a set: a list that can hold each distinct value only once. The first copy of a line is kept at its position; any later line that is exactly the same is skipped. Finally the kept lines are joined back together with line breaks.
"Exactly the same" is meant literally. Two lines match only if every character matches, including capital letters, spaces and punctuation. Apple and apple are different lines, and so are "banana" and "banana " with a trailing space. Being this strict means nothing you meant to keep gets merged by accident. The downside is that near-duplicates stay in the list.
Assumptions and limits
- Matching is case-sensitive. Convert the list to lower case first (the Text to Lowercase tool does this) if Email@site.com and email@site.com should count as one.
- Leading and trailing spaces count. A line copied with an extra space at the start or end won't match its twin. If your list came from mixed sources, trim it first, for example with =TRIM() in a spreadsheet.
- Blank lines are treated like any other line: the first empty line is kept and later empty lines are removed.
- The tool compares whole lines. It doesn't find repeated words or sentences inside a line, and it doesn't sort the result.
- Everything happens as you type, so very large pastes of hundreds of thousands of lines depend on your device's memory and speed.
Worked examples
Dedupe an email list
Five addresses with two repeats become three unique ones. a@x.com and b@y.com stay in first and second place because that is where they first appeared.
Input (5 lines): a@x.com b@y.com a@x.com c@z.com b@y.com Output (3 lines): a@x.com b@y.com c@z.com
Keyword list with case and spacing differences
From six keyword lines, only the two exact repeats are removed. "SEO tools" with capitals and " pdf merge" with a leading space are kept, because they are not character-for-character identical. Lower-casing and trimming the list first would bring it down to two lines.
Input (6 lines): seo tools pdf merge seo tools SEO tools pdf merge pdf merge Output (4 lines): seo tools pdf merge SEO tools pdf merge
Remove duplicate rows from a spreadsheet column
Copy a column of 2,000 order IDs from Excel or Google Sheets, paste it here, and copy the result back into an empty column. Each ID is pasted into its own cell again, in the same order as the first occurrences, with the repeats gone.
Which lines count as duplicates
| Line A | Line B | Treated as duplicate? |
|---|---|---|
| apple | apple | Yes, B is removed |
| apple | Apple | No, capital letter differs |
| apple | apple␠ (trailing space) | No, the space differs |
| https://site.com | https://site.com/ | No, the slash differs |
| (empty line) | (empty line) | Yes, only the first is kept |
How to use the Duplicate Line Remover
- Paste your list. Put one item per line in the Input Text box; the counter beneath it shows how many words and characters you pasted.
- Review the unique lines. The Result box shows the list with repeats removed, in the order each item first appeared.
- Copy the cleaned list. Press Copy and paste the unique lines back into your spreadsheet, email tool or file.
Frequently asked questions
Does removing duplicate lines change the order of my list?
No. Each line stays where it first appeared and only the later copies are dropped. If you want the unique lines in alphabetical order as well, paste the result into the Sort Lines tool afterwards.
Is the duplicate check case-sensitive?
Yes. "London" and "london" are kept as two different lines. For lists where capitals don't matter, such as email addresses or tags, convert everything to lower case first and then remove duplicates.
Why are some duplicates still in my list?
Almost always because of an invisible difference: a trailing space, a tab, a different dash or quote mark, or a trailing slash on a URL. The tool only removes lines that match exactly, so tidy up spacing first if your data came from several sources.
Can I see how many duplicates were removed?
Not directly. There's no separate count of removed lines, but the counter below the input shows the size of your original list. To compare line counts, paste the result into a line or word counter, or into a spreadsheet column and check the row numbers.
Can I remove duplicate words instead of lines?
Not directly; the tool compares whole lines. To dedupe words, put each word on its own line first, for example by replacing spaces with line breaks in a text editor, then paste that list here.
Are the lists I paste kept private?
Yes. Duplicates are removed in your browser and the text isn't uploaded or saved. That matters when the list holds customer emails or other personal data.
This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.