top of page

Remove Duplicate Lines

Paste a list and get back only the unique lines, with a count and a list of what was removed. You choose whether case matters and which copy to keep. It runs in your browser.

How to use it

  1. Paste your list into the box, one item per line.
  2. Choose the options, such as case sensitivity or keeping the last copy.
  3. Copy the unique lines, or check the removed lines list.

Frequently asked questions

Is my list uploaded anywhere?

No. The lines are compared in your browser and nothing is sent to a server.

What counts as a duplicate?

Two lines are duplicates when their text is identical. With Case sensitive off, Apple and apple match. With Trim spaces on, a line with extra spaces around it matches the same line without them, and the result is trimmed.

Which copy is kept?

By default the first copy stays and later ones are removed. Choose Last to keep the final copy instead. Lines keep their original order unless you pick a sort.

What does Ignore empty lines do?

Blank lines, including lines with only spaces, are dropped from the result and not counted as duplicates. Leave it off to keep blank lines, in which case repeated blank lines are removed like any other duplicate.

How do I see what was removed?

Open the Removed lines list under the result. It shows each removed line with its line number in your original text and the line it repeats. Long lists show the first 500.

How is the sort order decided?

Sorting uses English alphabetical order, where upper case and accents only break ties between otherwise equal lines. Numbers are sorted as text here, so 10 comes before 2. Use the Sort Lines tool for number-aware sorting.

More free tools

Sort Lines | Text Cleaner | Text Compare | Find and Replace

bottom of page