free tool · no sign-up · runs in your browser

Remove duplicate lines

Paste a list with one item per line: emails, keywords, URLs, product codes, names. Duplicates go, keeping the first time each one appears, and you can ignore case, trim stray spaces, drop empty lines and sort the result, with numbers in natural order so 2 comes before 10.

paste here

result

Free to embed. Put this remove duplicate lines on your blog, docs or class page.

What each option does

OptionBeforeAfter
Remove duplicatesa, b, aa, b
Ignore caseAda, adaAda
Trim spaces' ada ''ada'
Remove empty linesa, (blank), ba, b
Sort A→Z (natural)item10, item2item2, item10

Do it in a terminal

sort -u list.txt sorts and removes duplicates. To keep the original order, use awk '!seen[$0]++' list.txt. Add -f to sort to ignore case.

Remove Duplicate Lines: questions

Which copy of a duplicate is kept?+

The first one. Every later line that matches an earlier one is removed, so the list keeps its original order unless you sort it.

What does Ignore case do?+

It treats Apple, apple and APPLE as the same line. That's what you want for emails and domains, which aren't case-sensitive.

How do I remove duplicates in Excel or Google Sheets?+

In Excel, select the column and choose Data › Remove Duplicates. In Google Sheets, choose Data › Data cleanup › Remove duplicates, or use =UNIQUE(A:A). Pasting the column here is quicker when you just need the list.

More free tools