Free online tools
English EN, Choose a language

Remove duplicate lines

Paste a list and remove duplicate lines in one step, or show just the repeats or just the lines that appear once.

Result

Paste a list, one item per line. Duplicates are removed as you type.

Runs in your browser. Your list is never uploaded or stored.

Related tools

All text tools →

How to remove duplicate lines

  1. Paste your list, one item per line: email addresses, product codes, URLs, names, keywords. Insert example loads a small list.
  2. Choose what to keep. The default removes later copies and keeps the first of each line.
  3. Set the comparison: tick Ignore capital letters if Apple and apple are the same item, and Ignore spaces if stray spaces made equal lines look different.
  4. Copy the result or download it as a .txt file. The numbers under the result show how many lines came in and went out.

Example: the same list, four ways

The input list:

apple
Banana
apple
cherry
banana

cherry
date
SettingResult (lines joined with ·)
Keep first, case mattersapple · Banana · cherry · banana · (empty line) · date
Keep first, ignore caseapple · Banana · cherry · (empty line) · date
Only lines that repeatapple · Banana · cherry
Only lines that appear once, no empty linesdate

With case ignored, 8 lines in become 5 lines out, and 3 different items repeat.

Keep the first or the last duplicate

Which copy survives matters when the order carries meaning. A log of orders, a changelog or an export where the newest entry is last usually needs keep the last: the final occurrence of each line stays, in its original position.

order-1001
order-1002
order-1001
order-1003
order-1002
order-1001
order-1003
order-1002

For plain lists of names or keywords, keeping the first is the usual choice and preserves the order you pasted.

Find the lines that repeat, or that never do

The two filter options turn the tool into a quick audit. Show only the lines that repeat lists each repeated line once, which finds duplicate IDs, double entries or the keywords you used twice. Show only the lines that appear once does the opposite and drops anything that has a twin. To compare two separate lists rather than one, use text compare.

Why duplicates survive, and how to fix it

Need the cleaned list in order? Send it on to sort lines, which can also remove duplicates while it sorts.

Common jobs for a duplicate-line remover

Big lists are fine: the tool compares lines through a hash lookup, not by checking every pair, so doubling the list roughly doubles the time rather than quadrupling it. Only the first 250,000 characters are shown in the result box, while Copy and Download give you everything.

Related tools

Remove duplicate lines FAQ

How do I remove duplicate lines from a list?

Paste the list into the box, one item per line. With the default setting the first copy of each line is kept and the rest are removed. Copy the result or download it.

Does it keep the original order?

Yes. Lines stay in the order you pasted them. Choose keep the last if the final occurrence should survive instead of the first.

Can it ignore upper and lower case?

Yes. Tick Ignore capital letters and Apple, APPLE and apple count as the same line. The first copy is kept as you typed it.

Why are some duplicates not removed?

Usually an invisible difference: a trailing space, a tab, a different capitalization or a look-alike character. Keep Ignore spaces ticked and try Ignore capital letters.

Can I see only the duplicates?

Yes. Choose Show only the lines that repeat. You get one copy of each line that appears more than once. The last option shows lines that appear only once.

Is there a limit on list size?

There is no fixed limit. Lists of hundreds of thousands of lines are processed in a moment; the result box shows the first 250,000 characters while Copy and Download use everything.

Is my list uploaded anywhere?

No. Everything runs in your browser, so email lists and customer data are not sent to a server or stored.

Missing something in the remove duplicate lines?Suggest an idea. It takes 20 seconds and we read every one.Suggest an idea

Sends only what you type here, never the text you work with. Your email is used only to reply about this idea.

Free online tools