Remove Duplicate Lines

Keep the first copy of every line, in the original order.

Original

0 chars

Result

Runs on this device. Nothing is uploaded.

About the Remove Duplicate Lines

Turn a list with repeats into a unique list without changing its order. Duplicates can be matched ignoring upper and lower case and ignoring stray spaces at the ends of lines, which is where copy-pasted lists usually differ. The count of removed lines appears under the result.

How to use it

  1. Paste the list, one item per line.
  2. Choose how strictly lines must match.
  3. Copy the unique list.

Example

Input
apple Banana apple banana cherry
Result
apple Banana cherry (2 removed)

Questions

Which copy is kept?

The first one. Later repeats are removed, and the remaining lines stay in their original order.

Can I also sort the result?

Send the result to Sort Lines, or build a recipe that removes duplicates and sorts in one go.

How large a list can it handle?

Hundreds of thousands of lines. Matching uses a hash set, so it stays fast as the list grows.

Related tools