1. Home
  2. Text
  3. Remove Duplicate Lines

Remove Duplicate Lines

Remove repeated lines from a list and see what was duplicated.

Runs in your browser · No upload Works offline
Total lines
7
Lines kept
4
Lines removed
3
Result
anna@example.com ben@example.com chris@example.com Ben@example.com
Duplicated lines
LineOccurrences
anna@example.com3×
chris@example.com 2×

How to use

  1. Paste a list with one item per line — keywords, email addresses, SKUs, order numbers.
  2. The deduplicated list appears right away, along with total, kept and removed line counts.
  3. Leave Show duplicated lines on to see which lines repeated and how many times.
  4. Use Copy or Download .txt to take the result with you.

What the options do

Option Behavior Example
Ignore leading/trailing spaces Spaces and tabs at either end are ignored when comparing. The kept line is output exactly as it was typed apple and apple count as the same
Ignore case Upper and lower case letters compare equal Apple and apple count as the same
Remove empty lines Drops blank and whitespace-only lines When off, blank lines are deduplicated like any other line
First / last occurrence Chooses which copy of a repeated line survives. Either way, the remaining lines keep their original order a b a c → first: a b c, last: b a c

Example

The sample list has seven email addresses: anna three times, chris twice (one with a trailing space) and ben twice (once as Ben). With the default options it shrinks to four lines, because ben and Ben differ only in case. Turn on Ignore case and it becomes three lines — anna, ben, chris — with four removed.

Things to know

  • Comparison is per line. Repeated words inside a single line are left alone.
  • Windows (CRLF), classic Mac (CR) and Unix (LF) line endings are all recognized; the result uses LF. A single trailing newline at the end of the input is not counted as an extra empty line.
  • Text is Unicode-normalized (NFC) before comparing, so visually identical accented letters typed in different ways match.

FAQ

Can I dedupe a column from Excel or Google Sheets?

Yes. Copy the column and paste it here — each cell becomes one line. Paste the result back into the sheet.

I also want the list sorted.

The sort lines tool sorts alphabetically or naturally and can drop duplicates at the same time. Use this tool when the original order matters.

How do I compare two lists?

Paste them into text diff to see added and removed lines highlighted.

Coming soon

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.