Skip to content
toolgrid

No tool found. Try another word.

Remove Duplicate Lines

Delete duplicate lines from a list or text and keep the first occurrence, in the original order. Case-sensitive or not, with or without trimming.

0
Lines
0
Unique
0
Duplicates removed

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the Remove Duplicate Lines

  1. 1 Paste your list into the left box, one item per line.
  2. 2 Choose whether uppercase and lowercase count as different and whether spaces at line edges are ignored.
  3. 3 Copy or download the list without duplicates.

About the Remove Duplicate Lines

This tool removes repeated lines from a list or text. It keeps the first time each line appears and deletes every later copy, without changing the order of the lines. That makes it ideal for cleaning up email lists, keywords, URLs, product codes, names or log files.

With "Case-sensitive" switched off, "Apple" and "apple" count as the same line. "Trim spaces" ignores (and removes) spaces at the start and end of lines, so "cherry" and " cherry " are duplicates too. Empty lines are kept as they are by default, so the layout of your text stays intact.

The counters show how many lines there were, how many are unique and how many duplicates were removed. If you also want the list in alphabetical order, use the Text Sorter, which can remove duplicates while sorting.

Frequently asked questions

Which copy of a duplicate line is kept?

The first one. Every later line that is the same is removed, and the order of the remaining lines does not change.

Are "Apple" and "apple" duplicates?

Only when "Case-sensitive" is switched off. With it on (the default), lines must match exactly, including uppercase and lowercase letters.

What happens to empty lines?

With "Keep empty lines" on, empty lines are left in place and not treated as duplicates. Switch it off to keep only the first empty line.

Is there a limit to the number of lines?

No practical limit. Lists with hundreds of thousands of lines are processed in your browser in a moment.