Remove Duplicate Lines

Remove duplicate lines from a list or block of text.

Keep first
Keep last
Ignore case
Ignore surrounding whitespace
Input
Result
apple banana cherry date
Duplicates removed: 2

This tool strips duplicate lines out of a list: paste your text and only unique lines remain, with the order of the rest preserved. You can compare lines case-insensitively, ignore leading/trailing whitespace, and choose which occurrence to keep when a line repeats — the first one or the last one.

That's handy for cleaning up spreadsheet or database exports, email or domain lists, log files, and SEO keyword lists — anywhere stray duplicates crept into a list. Hunting duplicates by hand in a long list is slow and error-prone; this does it instantly.

Everything runs right in your browser — your text is never sent anywhere. The result and the number of removed lines appear immediately, and you can copy it with one click.

Frequently asked questions

The original order is preserved — only repeated occurrences are removed, the remaining lines are not re-sorted.
Turn on "Ignore case" — then Foo, foo, and FOO are treated as the same line and only one of them stays.
Sometimes the more recent version of a line matters more, e.g. when merging several exports — in that case pick "Keep last."