Skip to content
helpyself

Remove Duplicate Lines

Local only — nothing is uploaded unless you save or share it.

Remove duplicate lines, blanks and stray spaces from a list in one pass.

  1. Paste your list, one entry per line
  2. Choose whether capitalisation counts, and whether to sort the result
  3. Clean it, then copy or download the list

Share a link

Saves this to your files and gives you a web address anyone can open. It stops working on its own.

Link lasts
Save this tool

Keep Remove Duplicate Lines handy

Bookmark it

About this tool

Lists arrive full of repeats — email addresses pasted from three places, a log with the same error a hundred times, a keyword list assembled by hand. Removing the duplicates is trivial in a shell and awkward everywhere else, which is why people end up sorting a spreadsheet column and deleting rows by eye. The details are what make it reliable. Two lines that differ only by a trailing space are almost always the same line, and the difference is invisible, so trimming happens by default. Comparison ignores capitalisation unless you ask otherwise, because the same address written two ways is still one address. The original order is preserved: the first occurrence of each line survives, so the cleaned list can still be checked against what you started with. You can also invert the whole thing and see only the entries that repeated, which is the other half of the same question and normally means diffing two files by hand. Sorting understands accented letters, so a Danish list does not come back with æ, ø and å in a clump at the end.

Frequently asked questions

Does it keep my list in the original order?

Yes, unless you choose to sort it. The first occurrence of each line stays where it was and later copies are removed, so the result still lines up with the list you pasted. That makes it easy to check what was taken out.

How do I find duplicate lines rather than remove them?

Switch the mode: instead of a clean list you get only the entries that repeat, with a count. That is the useful direction when the duplicates are the finding — two exports that should have matched, a mailing list that has somebody twice. The job goes by several names, deduplicate list among them, but delete duplicate lines online and this are the same one pass.

Why are two lines that look identical not being matched?

Almost always trailing whitespace, which you cannot see. Keep the trim option on and it will not matter. The other cause is a difference in capitalisation combined with case sensitivity switched on.

Can I see which lines were duplicated instead of removing them?

Yes. Switch on the option to show only duplicates and you get one entry for each line that appeared more than once, in the order they were first seen. It is the fastest way to find the repeated addresses in a mailing list.

Should I keep the first or the last copy of a duplicate?

Keep the first if order matters, which is the default. Keep the last when later entries are more recent, such as a log where the newest line supersedes the earlier ones. Either way only one copy of each line survives.

Is my text uploaded anywhere?

No. The whole thing runs in your browser, so nothing is sent to a server. There is also a REST API for the same operation if you need to clean lists from a script, and that one necessarily processes on the server.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/duplicate-line-remover

↑↓ to move · Enter to open · Esc to close