Text tool

Remove Duplicate Lines

Paste one item per line. Repeated items disappear in one click.

Runs in your browser. No upload.

Your cleaned list will appear here.

Duplicates removed: 0

About this tool

Remove Duplicate Lines made simple.

Useful for lists of keywords, URLs, names, IDs, tags and copied spreadsheet rows.

Guide

Using Remove Duplicate Lines

Remove Duplicate Lines cleans a list that has repeated lines. You paste one item per line, choose a few options, and press the button. The tool keeps the first copy of each line, drops the later copies, and keeps the original order. It also tells you how many duplicates it removed. It works well for keywords, URLs, names, tags and rows copied from a spreadsheet. It does not sort the list or look for lines that are only similar.

How to use it

  1. Paste your list into the box, with one item on each line.
  2. Leave Trim spaces ticked to ignore spaces at the start and end of each line. Tick Ignore case if Apple and apple should count as the same.
  3. Leave Remove empty lines ticked to drop blank lines. Untick it if you want to keep one blank line.
  4. Press Remove duplicates. The clean list appears in the second box, and a counter shows how many duplicates went away.
  5. Press Copy result to copy the clean list, or Clear to empty both boxes.

Worked examples

A simple word list

You enter
Text
apple banana apple cherry banana
Trim
yes
Ignore case
no
Remove empty
yes
You get
List
apple banana cherry
Duplicates removed
2

The second apple and the second banana are repeats, so they go. The blank line at the end is dropped by the empty-line option and is not counted.

Run through the tool’s own code.

Same word, different capital letters

You enter
Text
Apple apple APPLE Pear
Trim
yes
Ignore case
yes
Remove empty
yes
You get
List
Apple Pear
Duplicates removed
2

With Ignore case on, the three spellings count as one item. The first one, Apple, is the one that stays. With Ignore case off, all four lines would stay.

Run through the tool’s own code.

Extra spaces around a line

You enter
Text
red red red red
Trim
yes
Ignore case
no
Remove empty
yes
You get
List
red
Duplicates removed
3

Trim spaces cuts the spaces off before the lines are compared, so all four lines are the same word. With Trim spaces off, only the exact last red matches the first, and the result is red, space red and red space.

Run through the tool’s own code.

Spreadsheet rows with tabs

You enter
Text
id1 Anna id2 Ben id1 Anna
Trim
yes
Ignore case
no
Remove empty
yes
You get
List
id1 Anna id2 Ben
Duplicates removed
1

Each row is compared as one whole line, tab included. The repeated id1 Anna row is removed and the first copy stays in place.

Run through the tool’s own code.

When it helps

  • Clean a keyword list before you paste it into an ad or SEO tool.
  • Remove repeated URLs from a list of links you collected over time.
  • Tidy a list of email names, IDs or tags copied from a spreadsheet column.
  • Merge two lists by pasting both, then removing the lines that appear in both.
  • Prepare a clean list of names for a draw or a roll call.

Limits to keep in mind

  • Only lines that match in full count as duplicates. A line that is only a close match, such as a typo, stays.
  • With Trim spaces off, a line with a trailing space is different from the same line without it.
  • The counter shows duplicates removed only. Blank lines dropped by the empty-line option are not counted in it.
  • The tool keeps the first copy and keeps the order. It cannot sort the list or choose which copy to keep.

Tips

  • Turn on Trim spaces and Ignore case for text typed by people, because small differences are common.
  • For spreadsheet data, copy a whole row only if the whole row should match. To match on one column, copy just that column.
  • Look at the result before you paste it back anywhere, because the tool cannot undo the removal in your source.
  • Keep your original list in another place until you have checked the clean one.

UsefulVerse guides

All guides

Common questions

About Remove Duplicate Lines.

Does it keep the first or the last copy of a line?

It keeps the first copy and drops the later ones. The kept lines stay in their original order, so the list is never re-sorted.

Does Ignore case change the text I get back?

No. It only changes how lines are compared. The line that stays is shown just as you typed it, so if Apple comes first, you get Apple back.

What does Trim spaces do?

It removes spaces and tabs from the start and end of each line before the check. The cleaned lines in the result are trimmed too, so the output will not have those spaces.

Why does a blank line stay when I untick the empty-line option?

Blank lines are treated like any other line. One blank line is kept as the first copy and the rest are counted as duplicates. Tick the option again to drop them all.

Can I remove duplicates from Excel rows?

Yes. Copy the rows, paste them here and press the button. Each row is compared as a whole line, tabs included. Check the result before you paste it back into the sheet.

Does it find lines that are almost the same?

No. It only finds exact matches after the options you picked. Two lines that differ by a letter, a dash or an accent are treated as different.

Is there a limit on how long the list can be?

The code sets no limit on lines. A very large paste depends on your browser and device, so for huge lists work in smaller parts and check the count.

Is my list uploaded?

No. The lines are compared in your browser and the page does not send them to a server. Pressing Clear empties both boxes.

How is this different from a sort-and-unique command?

A sort-and-unique command puts lines in order. This tool leaves the order as it is and removes only the later repeats, which is better when the order matters.

How do I remove duplicate rows copied from Excel?

Copy the rows, paste them here and remove duplicates. Each tab-separated row is compared as a whole, and the first matching row stays in place.

Does removing duplicates change the order?

No. The first occurrence of each full line stays in its original position. Review the result before pasting it back into a spreadsheet.