Remove Duplicate Lines

Paste a list with repeats and keep one copy of every line. Each line is trimmed before comparing, so a trailing space no longer hides a duplicate, and the first occurrence keeps its position in the list.

This page is preset to Remove Duplicates. Paste your text, then run it with one press.

Input

Words
0
Characters
0
No spaces
0
Lines
0
Actions

Output

Words
0
Characters
0
No spaces
0
Lines
0

How to use it

  1. Paste the list, one item per line.
  2. Press Remove Duplicates.
  3. Check the line count below the output to see how many rows were removed.
  4. Copy the result, or press Use to sort or export it.

How equality is decided

Lines are trimmed of leading and trailing whitespace and then compared character by character. That means Apple and Apple with a trailing space collapse into one, while Apple and apple stay separate unless you choose the case-insensitive variant.

The first occurrence wins. If the same value appears three times, the copy nearest the top of the list is the one kept, which preserves any ordering the source file had.

Case-insensitive deduplication

When a list mixes capitalization, use Dedupe (Ignore Case) in the sidebar instead. It compares lowercase versions of each line but keeps the original spelling of the first occurrence, which is the behaviour most people want for email lists, SKUs, and company names.

Limits worth knowing

This is an exact-match tool. It will not merge near duplicates such as 'Acme Inc' and 'Acme, Inc.' or detect fuzzy matches. For those, normalise the text first with Find and Replace, then deduplicate.

Frequently asked questions

Is the original order preserved?

Yes. The first occurrence of each line keeps its original position; nothing is reordered.

Is deduplication case-sensitive?

The Remove Duplicates button is case-sensitive. Use Dedupe (Ignore Case) if Apple and apple should count as the same entry.

Does it ignore whitespace differences?

Leading and trailing spaces are trimmed before comparing. Internal spacing is not collapsed, so 'New York' and 'New York' remain separate.

Related tools

Browse all text tools or open the full cleaner with every action.