List cleanup

Remove Duplicate Lines

Paste a list to remove repeated lines while choosing whether capitalization and surrounding spaces matter. Keep the first or last occurrence, optionally sort the result, then copy or download it.

Interactive Remove Duplicate Lines

Paste the lines

Processing options

Paste one item per line and choose an action.

How duplicate removal works

The tool creates a comparison key for each line, keeps the selected first or last occurrence, and reports the original count, unique count, and duplicates removed. The displayed spelling comes from the retained occurrence.

Capitalization and whitespace

Case-insensitive mode treats Project A and project a as duplicates. Trimming removes surrounding spaces before comparison; it does not rewrite spaces inside a line.

Example

For red, blue, red, and green, preserving the first occurrence returns red, blue, and green in that order. Sorting is a separate optional final step.

Practical input limits

For responsive browser-local processing, each input accepts up to 2,000,000 characters and 50,000 lines. Ordinary 10-line, 1,000-line, and 10,000-line lists are supported without a server round trip.

Related list tools

Browse the complete list-tools collection.