Skip to content
All tools
English

Remove duplicate lines

Clean an email list, a keyword list or a log in one click. The first copy of each line stays where it was.

Your files never leave your device

Type, paste or drop a .txt file. Everything stays on this device.

Words
0
Characters
0
Without spaces
0
Lines
0
Sentences
0
Reading time
0
Options

How to use it

  1. Paste your text

    Type, paste, or drop a .txt file into the editor. Long documents are fine.

  2. Set the options and remove

    Choose whether "Apple" and "apple" count as the same line, then press Remove duplicates. We tell you how many lines went.

  3. Copy or download

    Copy the result, download it as a .txt file, or press Undo to go back a step.

How duplicates are found

The tool reads the text line by line and remembers every line it has seen. The first time a line appears it is kept; any later copy is removed. The order of the remaining lines does not change, which matters for ranked lists, logs and anything you have already sorted by hand. If you want the result alphabetical as well, run sort lines afterwards.

The options

  • Ignore case: treats Apple, apple and APPLE as the same line and keeps whichever came first. Useful for email addresses and keywords.
  • Ignore spaces at the ends (on by default): a line with a stray space at the end counts as a duplicate of the same line without it. The kept lines are trimmed too.
  • Remove empty lines: deletes blank lines as well. When it is off, blank lines are left in place so paragraphs keep their shape.

Arabic names and spelling variants

أحمد and احمد are different strings to a computer, so a plain comparison keeps both. If your list mixes spellings, run normalise Arabic first: it unifies أ إ آ to ا, ى to ي and removes tashkeel, so the duplicates line up. Want to see how many lines remain? The counter above the editor shows it.

Frequently asked questions

Which copy is kept?
The first one. Every later line that matches it is removed, and the remaining lines keep their original order.
Can I remove duplicates from a CSV column?
Yes. Copy the column from your spreadsheet (each cell becomes a line), remove duplicates, then paste it back.
Is there a limit on the number of lines?
No fixed limit. Lists of a few hundred thousand lines take well under a second on a normal computer.