Skip to content
Engyna

Remove Duplicate Lines

Delete repeated lines from a list, keeping the first or last copy.

How to use the Remove Duplicate Lines

  1. 1Paste your list or drop a text file, one item per line.
  2. 2Choose whether to keep the first or last copy, only unique lines or only the repeated ones, and whether case and spaces matter.
  3. 3Copy or download the cleaned list and check which lines were repeated most.

About Remove Duplicate Lines

Remove Duplicate Lines deletes repeated lines from a list while keeping the original order. Paste a list or drop a text file and choose what to keep: the first copy of each line, the last copy, only lines that never repeat, or only the lines that do. Matching can ignore case, so Apple and apple count as the same line, and ignore spaces around a line, which catches duplicates that differ only by a trailing space from a spreadsheet export.

More options remove empty lines, sort the result in natural order, and compare only neighboring lines like the Unix uniq command. Statistics show lines in and out, how many were removed and how many distinct lines there are, and the Most repeated list shows which lines occurred most often and how many times. The cleaned list can be copied or downloaded as a text file.

Typical uses are deduplicating email and mailing lists, cleaning keyword or URL lists, removing double entries from a CSV column, merging lists from several sources, and finding entries that appear more than once. For more steps, such as sorting by a column or counting occurrences, use Line Tools.

Frequently asked questions

Is the original order kept?

Yes. Duplicates are removed without reordering the remaining lines. Switch on Sort the result if you also want them in order.

What is the difference between only unique and first copy?

First copy keeps one copy of every line. Only unique lines drops every line that appears more than once, so you are left with the lines that were never repeated.

What does only neighbouring repeats do?

It works like the Unix uniq command: a line is only removed when it is the same as the line directly above it. Repeats further apart are kept.

Is there a size limit?

Lists with hundreds of thousands of lines work, since everything runs in your browser. Nothing is uploaded.