Skip to content
hateitall

Remove Duplicate Lines

Turn a list with repeats, such as emails, URLs or keywords, into one entry per line, in the original order.

Processed locallyIn: Text, TXT, CSVOut: Text

Loading tool…

How to use remove duplicate lines

  1. Paste the list or open a text file.

  2. Choose whether to ignore case and spaces at the ends of lines.

  3. Choose to keep the first or the last copy of each repeated line.

  4. Copy or download the unique lines.

What this tool does

  • Keeps the original order of the lines it keeps.
  • Optionally treats "Apple" and "apple " as the same line.
  • Keeps the first or the last copy; can leave blank lines alone.
  • Reports how many lines were removed and which lines repeated most.

How the result is verified

The result is run through the same dedupe again and must come back unchanged, which proves no repeats are left under your rules.

Frequently asked questions

Does it keep the order?

Yes. Lines stay in the order they first appear (or last appear, if you choose to keep the last copy). Sort the result separately if you want it sorted.

Can it ignore case?

Yes. Turn on Ignore case and "Email@Site.com" and "email@site.com" are treated as one line; the copy that is kept keeps its own capitals.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Alphabetical, natural (file2 before file10) or by length, any language

Text · TXT · CSV→ TextLight on device

Delete blank lines, or keep one between paragraphs

Text · TXT→ TextLight on device

Hidden characters, spaces, blank lines and quotes cleaned in one pass

Text · TXT→ TextLight on device

Lines, blank lines, unique lines and the longest line

Text · TXT · CSV +→ Line countLight on device