Remove Duplicate Lines

Strip repeated lines from a list and keep everything else in order.

Runs in your browser
List
Drop file to load it
EmptySaved locally
Unique lines
Ready
"Apple" and "apple" count as the same line.
Trims each line and squeezes runs of spaces before comparing.
More options (1)
Try an example:

How to use the Remove Duplicate Lines

  1. Paste your list into the left panel, one item per line, or open a .txt or .csv file.
  2. Choose whether case and extra spaces should be ignored when comparing.
  3. The list without duplicates appears on the right instantly, in its original order.
  4. Copy the cleaned list or save it as a text file.

Examples

About this tool

Lists collect duplicates quickly: merged email exports, keyword research, product codes copied from several sheets, or log files that repeat the same message. This tool keeps exactly one copy of every line and removes the rest, without re-sorting, so the order you pasted is preserved.

Two lines rarely differ only by accident in the way you expect. A trailing space, a double space in the middle or different capitalisation can make "the same" line look unique to a computer. With "Ignore extra spaces" and "Ignore upper/lower case" you decide what counts as a duplicate. The line that survives is shown exactly as it was written (only trimmed if you asked for it).

Tip: choose "keep the last occurrence" when later lines are more up to date, for example when combining an old and a new export of the same list. The status bar under each panel shows the line count, so you can see at a glance how many duplicates were removed.

This tool runs entirely in your browser. What you type or open is never sent to a server.

Frequently asked questions

Does it change the order of my lines?

No. Lines stay in the order you pasted them. Only the repeats are dropped. If you also want the list sorted, use the Sort Lines tool on the result.

What counts as a duplicate?

By default two lines are duplicates when they match after trimming spaces at the ends and squeezing double spaces. Turn on "Ignore upper/lower case" to also treat "Paris" and "PARIS" as the same.

How many lines can it handle?

Hundreds of thousands. Matching uses a hash map, so even very long lists are processed in a fraction of a second on a normal laptop or phone.

Is my list sent to a server?

No. Everything happens in your browser, so private lists such as customer emails never leave your device. Nothing is logged or stored except a local copy of your input in this browser.