Skip to content
GoWebTools

Remove Duplicate Lines

Remove duplicate lines from any list instantly. Options for case sensitivity, trimming, sorting and keeping only the lines that repeat. Free and private.

On your device: nothing you enter here is uploaded.

Input

Result

The result appears here as you type.

What this tool is for

Exported lists arrive dirty: the same email twice, a keyword repeated with different capitalisation, a stray blank line in the middle. This strips repeats and gives you a clean list back, and it can do the opposite too, showing only the entries that appeared more than once.

Options that decide what counts as a duplicate

Case sensitive: off by default, so "Apple" and "apple" are treated as the same line. Turn it on for code, passwords or anything where case carries meaning.

Ignore surrounding spaces: on by default, so a line with a trailing space still matches its twin. This is the usual reason a spreadsheet says two cells differ when they look identical.

Keep only duplicates and keep only lines that appear once are the two inverse modes: the first lists every value that repeats, the second lists values that never repeat. Comparing two lists is a common use: first remove duplicates inside each list on its own, then paste both, one after the other, and keep only duplicates to see what they share. Skipping the first step lists a value that repeats inside one list as shared even when the other list does not have it.

Order is preserved

The first occurrence of each line stays where it was and later repeats are removed, so a list keeps its original order unless you turn on sorting. That matters for ranked lists, log files and anything where position carries information.

The same thing in Excel, Sheets or a terminal

Excel: Data, then Remove Duplicates. Google Sheets: Data, Data cleanup, Remove duplicates, or the UNIQUE function. In a terminal, sort -u file removes duplicates but reorders the lines; awk '!seen[$0]++' file removes them and keeps the original order. This page is faster for a one-off list, and nothing you paste is uploaded.

How to use it

  1. Paste your list, one item per line.
  2. Decide whether case matters and whether surrounding spaces should be ignored.
  3. Switch to "keep only duplicates" if you are hunting for repeats rather than removing them.
  4. Copy the cleaned list.

Frequently asked questions

Is the order preserved?

Yes. The first occurrence of each line keeps its position, and later copies are dropped. Turn on sorting if you would rather have the result alphabetised.

Can I find which lines were duplicated?

Yes. Switch the mode to "keep only duplicates" and you get every line that occurred at least twice, once each.