How to Remove Duplicate Lines
Duplicate lines creep into every list — merged spreadsheets, combined email lists, copied search results. Removing them by hand is slow and unreliable, but a dedupe tool does it in one click: paste the list, and every repeated line is dropped while the first copy stays exactly where it was.
Where duplicate lines come from
Lists built from more than one source
Duplicates appear whenever a list is built from more than one source. Two spreadsheets merged into one, an email list combined from three sign-up forms, a set of URLs exported from two tools, a keyword list pasted together from several reports — each source is clean on its own, but the merged list repeats entries, and the repeats are scattered too far apart to spot by eye.
Repeats inside a single list
They also appear inside a single list. Copy-paste accidents, a form submitted twice, a search export run on overlapping dates — all of them produce repeats. The result looks fine at a glance, but the duplicates quietly inflate counts, waste time and, in the case of mailing lists, send the same message twice to the same person.
What counts as a duplicate
The simplest definition is exact: two lines are duplicates if they contain exactly the same characters. That is the default, and it is what most people want. But real lists are messier. One copy might have a trailing space, another might differ in capitalisation — Apple versus apple — and a strict comparison would miss both.
That is why a good dedupe tool offers options. Ignoring case treats Apple and apple as the same line, which is right for email addresses and names. Trimming spaces treats a line copied with a stray space as a duplicate of its clean twin. Both options only affect the comparison, so the line that survives is shown as it was written.
Remove duplicate lines in four steps
- Copy your list. Select the lines you want to clean — one item per line — and copy them. The list can come from a spreadsheet column, a text file, an email or a web page.
- Paste it into the tool. Open the Remove Duplicate Lines tool and paste your list into the Input box. Nothing is uploaded: the cleaning happens in your browser.
- Set the options. Tick Ignore case if capitalisation should not matter, leave Trim spaces on to catch lines that differ only by stray whitespace, and tick Remove empty lines too if you want blank lines dropped as well.
- Click Remove Duplicates. The first copy of each line is kept, later copies are dropped, and the original order is preserved. Check the counts — lines in, lines out, duplicates removed — then copy or download the clean list.
After deduping: check the result
Check the numbers first
Before you use the cleaned list, spend a moment on the numbers. If the duplicate count is far higher or lower than you expected, something may be off — a wrong option, a list pasted twice, or a column copied with its header. The counts are there so a surprise is easy to catch before the list goes anywhere.
Near-duplicates the tool cannot catch
Also check for near-duplicates the tool cannot catch: the same name spelled two ways, an email with a typo, a URL with and without a trailing slash. Sorting the cleaned list helps here, because near-duplicates sit next to each other once sorted, and a quick scan finds them. The Sort Lines tool does that in one click.
Other ways to remove duplicates
Spreadsheets have a built-in remove-duplicates feature: in Excel and Google Sheets it sits in the Data menu, and it works well for lists that already live in a sheet. Text editors with regular-expression search can do it too, but the pattern is fiddly and easy to get wrong. Command-line tools like sort and uniq handle huge files, but they sort the list as a side effect.
The browser tool is the fastest option when your list is already copied or pasted as text, and it is the only one of these that guarantees the original order is preserved. Use a spreadsheet when the list lives in a sheet; use this tool for everything else.
Related guides
- How to Sort Lines Alphabetically (Free, A to Z and More) — sort any list A to Z in one click.
- How to Check Word Frequency (Free Word Counter Table) — see which words you use most, in a sorted table.
- How to Reverse Text (Free, Characters, Words or Lines) — flip text by characters, words or lines.
Questions people ask
Does removing duplicates sort my list?
No. The first copy of each line is kept and everything else stays in its original order. If you want the result sorted as well, use the Sort Lines tool afterwards.
Are Apple and apple treated as duplicates?
Only when Ignore case is ticked. By default the comparison is exact, so different capitalisation counts as a different line.
What happens to empty lines?
Empty lines are kept by default. Tick Remove empty lines too if you want every blank line dropped from the result.
Is there a size limit on the list?
No fixed limit, but very large pastes of hundreds of thousands of lines may feel slow in the browser. Split very big lists into chunks.