Skip to content
Free online tool

Remove duplicate lines

Paste a list and instantly remove repeated lines while keeping the first occurrence of each. Ignore case or extra spaces, drop empty lines, sort the result and see exactly how many duplicates were removed.

How to remove duplicate lines

  1. Paste your list into the left box, one item per line.
  2. Choose options: ignore upper/lower case, ignore leading and trailing spaces, remove empty lines, and sort A–Z.
  3. The cleaned list appears on the right immediately, with counts of lines in, unique lines and duplicates removed.
  4. Copy the result or download it as a text file.

How duplicates are detected

The tool reads your text line by line and keeps the first time each line appears, removing later repeats. By default, lines must match exactly, so “Apple” and “apple” are different. Turn on Ignore upper/lower case to treat them as the same. Ignore leading/trailing spaces trims stray spaces that often sneak in when copying from spreadsheets, so “ banana ” matches “banana”.

The original order is kept unless you choose to sort, which uses natural ordering so “item 2” comes before “item 10”. Processing happens entirely in your browser, so even long lists of email addresses or customer names stay private.

Where it helps

Remove duplicate lines FAQ

Which copy of a duplicate is kept?

The first one. Later repeats are removed, and the order of the remaining lines is preserved.

Can it remove duplicate words within a line?

No. It compares whole lines. Put each item on its own line first, for example with Find and Replace.

How many lines can it handle?

Tens of thousands of lines are processed instantly in a modern browser.

Related tools

More Text Tools

Need another tool?

Browse all 50 free tools for PDFs, images, text, SEO, calculations and development.

Explore All Tools