gazza.ltd

Duplicate Line Remover

Ad

Paste a list or block of text and remove every duplicate line, keeping the first occurrence of each. Useful for cleaning up mailing lists, spreadsheet exports, or any list that's been merged from multiple sources.

How it works

Each line is compared against every line seen before it. The first time a line appears it's kept; every later line that matches it is dropped. Matching can ignore case and surrounding whitespace, or treat lines exactly as typed.

Worked example

A list of cat, dog, Cat, dog, bird becomescat, dog, bird with "ignore case" on, orcat, dog, Cat, bird with it off.

A common real-world case: merging two exported contact lists where the same email address shows up with different capitalisation in each export. "Ignore case" catches those as duplicates that an exact-match comparison would miss.

Common questions

Does this keep the first or last copy of a duplicate?

The first occurrence is kept; later duplicates are removed. The order of the remaining lines is otherwise unchanged.

What does "ignore case" do?

With it on, "Apple" and "apple" are treated as the same line and only the first is kept. Turn it off if capitalisation should count as a difference.

What does "trim whitespace" do?

It strips leading and trailing spaces from each line before comparing, so "cat" and " cat " count as duplicates.

Is there a size limit?

No hard limit — very large lists (tens of thousands of lines) may take a moment longer, but everything still runs locally in your browser.

Does this sort the list too?

No, the original order is preserved — only exact duplicates are dropped. If you need the result sorted afterward, paste it into a spreadsheet or a dedicated sort tool.

Related tools