Skip to content
WebUtilityHub

Remove Duplicate Lines

Paste a list to remove repeated lines instantly. The first occurrence of each line is kept, in its original position, and you can see how many duplicates were removed.

Options
Lines in
0
Unique lines
0
Duplicates removed
0
Empty lines removed
0

How to use the Remove Duplicate Lines

  1. Paste your list into “Your lines”, one item per line.
  2. Choose the options you need. Trimming whitespace is on by default; turn on “Ignore case” to treat “Apple” and “apple” as the same line.
  3. Read the unique lines on the right and the number of duplicates removed below.
  4. Click “Copy result” to copy the cleaned list.

Examples

A list with repeated items
Input
banana
apple
banana
cherry
apple
Result
banana
apple
cherry
2 duplicates removed. The order of first appearance is kept; the list is not sorted.
Email addresses with different capitalisation (Ignore case on)
Input
Anna@example.com
anna@example.com
ben@example.com
Result
Anna@example.com
ben@example.com
The first spelling of each address is the one that is kept.
Lines with stray spaces (Trim whitespace on)
Input
red
  red
blue  
Result
red
blue

How duplicates are detected

Each line is compared with the lines that came before it. With Trim whitespace on, spaces and tabs at the start and end of a line are ignored, so red and red count as the same line, and the trimmed version appears in the result. With Ignore case on, capital and small letters are treated as equal.

Accents written in different ways, such as an “é” typed as a single character or as “e” plus an accent mark, are treated as the same, because both look identical on screen.

Counting what changed

The figures below the tool show how many lines you pasted, how many unique lines remain, and how many duplicates and empty lines were removed. A pasted list that ends with a line break has one extra, empty, last line, which is included in “Lines in”.

To treat “Apple” and “APPLE” as the same entry in the result as well, convert the list to lowercase with the Case Converter first. For lists with stray tabs, odd spaces or invisible characters, the Text Cleaner removes them before you deduplicate.

Common uses

  • Cleaning email lists, keyword lists or product codes before importing them.
  • Removing repeated entries from logs, exports or copied spreadsheet columns.
  • Merging two lists and keeping each item only once.
  • Checking how many duplicates a list contains without changing its order.

Limitations

  • Lines must match exactly (after the options you chose) to count as duplicates. Similar lines such as “colour” and “color” are kept.
  • “Ignore case” compares letters without their capitalisation but still treats accented and unaccented letters as different (“resume” and “résumé”).
  • The result uses standard line breaks, even if your text came from Windows with different ones.
  • The list is not sorted. Sort it in a spreadsheet or text editor if you need alphabetical order.

Frequently asked questions

Does the tool keep the original order of the lines?

Yes. Each line stays where it first appeared, and later repeats are removed. Nothing is sorted, which makes it safe for ordered lists such as rankings or step-by-step instructions.

Which copy of a duplicate is kept?

The first one. With “Ignore case” on, that also means the first spelling is kept, so “Anna@example.com” followed by “anna@example.com” keeps “Anna@example.com”.

What happens to empty lines?

By default, empty lines are treated like any other line, so repeated blank lines are reduced to a single one. Turn on “Remove empty lines” to drop all blank lines from the result.

Can it handle long lists?

Yes. Lists of hundreds of thousands of lines are processed in a fraction of a second on a typical computer, because the tool uses a fast lookup for lines it has already seen.

Remove extra spaces and empty lines, normalise line breaks and tidy pasted text.

Text

Count words, characters, sentences, paragraphs and lines, with an estimated reading time.

Text

Convert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case or kebab-case.

Text