Skip to content
Text Cleanup Tools

Text Cleanup Tools › Lists and lines

Remove Duplicate Lines

Paste a list and keep each line once, in its original order.

Processed on your device. Nothing is uploaded or stored on a server.

How it works

  1. Paste your list, one item per line.
  2. Choose whether capital letters matter and whether stray spaces should be ignored.
  3. Copy the deduplicated list.

Example

Before
apple
Banana
apple
 banana
Cherry
banana
cherry
After
apple
Banana
Cherry

What this tool does

The first time a line appears it is kept; later copies are dropped, so your original order is preserved. By default matching ignores case and surrounding spaces, which catches the usual near-duplicates in email lists, keyword exports and URL lists such as "Apple" and "apple ". Turn on case sensitivity when capitalisation matters, for example in file names or code identifiers. If you also want the list alphabetised, run it through the sorter afterwards.

Common problems

Obvious duplicates were kept

They may differ by invisible characters or trailing spaces. Keep "Ignore spaces at line ends" on and clean hidden characters first.

I want to see which lines were duplicates

This tool only keeps unique lines. Compare the line counts in the stats, or sort first and look at neighbours.

Questions

Which copy is kept?

The first occurrence. Later occurrences are removed.

Is there a size limit?

No fixed limit. Lists of hundreds of thousands of lines work, but very large pastes depend on your device memory.

Can it dedupe words in a sentence?

It works on lines. Put each word on its own line first, for example by replacing spaces with line breaks.

Related tools

Last reviewed 2026-10-14.