Remove Duplicate Lines

Remove repeated lines from any list — keep the original order, ignore case or extra spaces, and drop empty lines.

Last updated:

Remove duplicate lines

Merging contact lists, cleaning a column copied from Excel, tidying keyword lists or removing repeated email IDs? This tool removes duplicate lines in one go and tells you how many it removed. It keeps thefirst occurrence in its original order, can ignore capital letters and stray spaces, and drops blank lines — all instantly in your browser, with nothing uploaded.

How to use it

  1. Paste your list, one item per line.
  2. Choose whether to ignore case, trim spaces and remove empty lines.
  3. Copy or download the cleaned list.

Example

The list Mumbai, Delhi, Pune, mumbai, Chennai, Delhi, (blank), “Pune ” becomes Mumbai, Delhi, Pune, Chennai — 4 removed — with case and spaces ignored. Then put it in order with thesort lines tool, or compare two versions of a list withtext compare.

Frequently asked questions

How do I remove duplicate lines from a list?
Paste your list with one item per line. The tool keeps the first occurrence of every line, removes the repeats, and keeps the original order. Copy the cleaned list from the result box.
Can it ignore capital letters and extra spaces?
Yes. Tick “Ignore case” so “Delhi” and “delhi” count as duplicates, and “Trim spaces” so lines that differ only by spaces at the start or end are treated as the same.
Is there a limit on list size?
It handles lists of tens of thousands of lines instantly, because everything runs in your browser. Nothing is uploaded.
Can I also sort the list?
Use the sort lines tool after removing duplicates to put the list in alphabetical, numeric or length order.