Remove Duplicate Lines

Paste a list, one item per line, and remove repeated lines automatically. Adjust the options below to fit your needs.

Input text

Original lines 0
Empty lines removed 0
Duplicates removed 0
Unique lines 0

How the removal works

The text is split into lines, and each line is compared against the previous ones. The first occurrence of each line is kept in its original position; later repeats are discarded. The options below adjust how that comparison is made.

What each option does

Ignore case: treats "Banana" and "banana" as the same line. Trim whitespace: strips extra spaces before comparing, so " item" and "item" become the same line. Remove empty lines: discards any blank line before duplicates are even checked. Sort result: arranges the unique lines alphabetically instead of keeping their original order of appearance.

Common use cases

Cleaning up email lists, removing repeated URLs from a log file, consolidating keyword lists for SEO, organizing a to-do list pasted from different sources, or just tidying up any pasted list with repeated items.

Frequently asked questions

Which line is kept when there are duplicates?

The first occurrence of each line is kept, in its original position (unless you enable the sort option). Later occurrences of the same line are removed.

What does the "ignore case" option do?

With this option on, "Banana" and "banana" are treated as the same line and one of them is removed as a duplicate. Without it, comparison is case-sensitive and both lines would be kept.

What happens to extra spaces at the start or end of a line?

By default, extra spaces make two similar lines count as different. Enabling "trim whitespace" removes those spaces before comparing and in the final result.

Is the pasted text sent to a server?

No. All duplicate removal happens locally in your browser, in JavaScript, without sending the content off your device.