Don's Tools · Text & Writing · Remove Duplicate Lines

Remove duplicate lines

Clean a list by removing repeated lines, right in your browser. Nothing is uploaded.

Keep
Remove Duplicate Lines is a free tool that removes repeated lines from a list entirely in your browser, with nothing uploaded. You can ignore case, trim spaces on each line, drop blank lines, keep either the first or last occurrence of each line, and optionally sort the result, then copy or download it.

Files are processed in your browser and never uploaded.

How to use Remove duplicate lines

  1. Add your text

    Type or paste your text into the input box. Everything is handled by your own browser, so nothing is sent to a server.

  2. Set the options

    Choose Ignore case, Trim each line, Remove blank lines and Sort result. The options are visible from the start, not hidden until you paste something.

  3. Read it and keep a copy

    The output updates as you type, so there is nothing to submit and nothing to wait for. Copy result, Don puts the result on your clipboard and Download .txt saves it as a file.

What this tool does

Remove duplicate lines from a list

Paste a list and every repeated line is removed, leaving one of each, with the counts shown so you can see what went.

Ignore case and trim spaces

Ignore case treats Apple and apple as the same line, and Trim each line stops a stray space making two identical entries look different.

Keep first or last occurrence

Keep First or Last decides which copy of a repeated line survives, which matters when the list is in a meaningful order.

Optionally drop blanks and sort

Blank lines can be dropped and the result sorted, so a messy export comes out as a clean, ordered list in one pass.

No upload, no sign-up

The list is processed in your browser, so nothing is uploaded, and Copy result or Download .txt takes it away.

Frequently asked questions

Is my list uploaded anywhere?

No. The lines are processed entirely in your browser and are never sent to a server.

How are duplicates decided?

Two lines are duplicates when they match exactly. Turn on Ignore case to treat capitals as the same, and Trim each line to ignore leading and trailing spaces.

Does it keep the order of my list?

Yes, the original order is kept unless you turn on Sort result. With Keep First it keeps the first time each line appears; with Keep Last it keeps the last.

Can it also remove blank lines?

Yes. Turn on Remove blank lines to drop empty lines as well as duplicates.

What is the difference between Keep First and Keep Last?

If the same line appears more than once, Keep First leaves the earliest copy in place and removes later ones, while Keep Last keeps the final copy.

Is there a size limit?

No fixed limit, but very large lists are handled in your browser and may be slower on an older device.

Last updated: