Remove Duplicate Lines

Delete repeated lines from any list, or find which lines are duplicated, in one paste.

Runs in your browser. Nothing you enter is uploaded.

Show

How to use Remove Duplicate Lines

  1. Paste your list with one item per line. Lists copied from Excel, Google Sheets and documents work.
  2. Pick what to show: each line once, only the duplicates, or only the lines that appear once.
  3. Turn on "Ignore case" if "Apple" and "apple" should count as the same line.
  4. Choose whether to keep the first or the last copy, and sort the result if you want.
  5. Copy the result, or download it as a .txt file.

Examples

A list with repeated items

Settings
  • Show: Each line once
Input
apples
bananas
apples
cherries
bananas
apples
Result
apples
bananas
cherries

Each item keeps the place where it first appeared.

Email addresses that differ only in capitals

Settings
  • Show: Each line once
  • Ignore case: On
  • Sort: A to Z
Input
anna@example.com
Ben@Example.com
ben@example.com
ANNA@example.com
chris@example.com
Result
anna@example.com
Ben@Example.com
chris@example.com

The first spelling of each address is kept, and the list is sorted.

Find which lines are duplicated

Settings
  • Show: Only the duplicates
  • Show counts: On
Input
order 1041
order 1042
order 1041
order 1043
order 1042
order 1041
Result
order 1041 (3)
order 1042 (2)

Only the repeated lines are listed, each with how many times it appears.

How it works

Each line of your list is compared with every other line. The result updates as you type, and nothing is uploaded: it all runs in your browser, so lists of email addresses or customer names stay private.

Show What you get Use it for
Each line once Your list with every repeat removed Cleaning email lists, keywords, product codes
Only the duplicates Each line that appears more than once, listed once Finding double orders, repeated entries
Only lines that appear once Lines with no copies at all Spotting the odd ones out

When two lines count as the same

  • Exact match by default: “Apple” and “apple” are different lines. Turn on Ignore case to treat them as the same.
  • Spaces: with Ignore extra spaces on, spaces at the start and end don’t count, and two spaces in a row count as one. “anna@example.com “ with a trailing space is a duplicate of “anna@example.com”. Zero-width characters, which you can’t see but often come along when you copy from websites and chat apps, are ignored too.
  • Accents: “é” typed as one character and “é” built from “e” plus an accent mark count as the same.
  • Empty lines are removed. Turn off Remove empty lines to keep them where they are, for example between groups.

Which copy stays

With Keep: First copy, each line stays where it first appeared, and later copies are removed. With Last copy, the line moves to where it last appeared. When Ignore case is on, the spelling of the copy you keep is the one you see: “Ben@Example.com” or “ben@example.com”.

Sorting

A to Z and Z to A sort numbers the way people expect: “item 2” comes before “item 10”. Empty lines are dropped when sorting.

Counts

Show counts adds how many times each line appeared, like “order 1041 (3)”. Combined with Only the duplicates, it’s a quick way to see which entries were repeated and how often.

Questions

How do I remove duplicate lines but keep the original order?

Paste the list above with Sort set to Original order. Each line stays where its first copy was. Set Keep to "Last copy" to keep the last one instead.

How do I remove duplicates in Excel?

Select the column, then go to Data → Remove Duplicates and click OK. Excel treats "Apple" and "apple" as the same. In Google Sheets, use Data → Data cleanup → Remove duplicates.

How do I remove duplicate lines in Notepad++?

Open Edit → Line Operations → Remove Duplicate Lines. It keeps the first copy of each line. "Remove Consecutive Duplicate Lines" only removes repeats that are next to each other.

How do I remove duplicate lines in Linux?

Use sort -u file.txt to get sorted unique lines, or awk '!seen[$0]++' file.txt to remove duplicates and keep the original order.

Why are some duplicates not removed?

The lines differ in a way you can’t see: capitals, spaces or invisible characters. Turn on "Ignore case" and keep "Ignore extra spaces" on. Invisible zero-width characters are ignored too while "Ignore extra spaces" is on.

Updated October 8, 2026 · Works in current Chrome, Edge, Firefox and Safari · Runs entirely in your browser