Remove duplicate lines

Drop repeated lines from a list, keeping the first copy where it was, with options for capitals and stray spaces.

Remove duplicate lines

0 characters

Three steps — nothing to install

  1. Paste the list

    One item per line: email addresses, product codes, URLs, names.

  2. Choose what counts as a duplicate

    Ignore capitalisation, ignore spaces at the edges, or keep the last copy instead of the first.

  3. Copy the clean list

    The removed count is reported, and the order of the remaining lines is unchanged.

Where duplicate lines come from

The usual sources are merges: two exported mailing lists, a spreadsheet with a VLOOKUP that matched twice, log lines collected from two servers. A spreadsheet can remove duplicates, but it reorders or shifts the data on the way. This tool keeps every surviving line exactly where it was, which makes it safe to compare before and after.

Matching is on the whole line, not on part of it. Asha and Asha Karwar are different lines and both stay. If you need to match on part of a line, sort the list first so near-duplicates sit next to each other, then read the result rather than trusting a count.

The three matching options

Ignore capitalisation makes Goa and goa the same line. It is what you want for email addresses, which are case-insensitive in practice, and usually not what you want for product codes, which are not.

Ignore spaces at the edges trims each line before comparing, so a line pasted with a trailing tab still matches. Keep the last copy is for lists where the later entry is the newer one — it moves the surviving line to the position of the last occurrence, which is the one you keep.

Order, blanks and limits

Blank lines are never treated as duplicates, so a list that uses them as paragraph separators keeps its shape. The report tells you how many lines were removed, not just how many remain, so you can check the result against the original count.

Everything runs on the strings in the tab. A list of a million lines is limited by your device's memory and by the fact that the page redraws the result; a few hundred thousand lines is comfortable.

Frequently asked questions

Does it sort the list?No. It keeps the original order and only removes later copies. Sorting first groups duplicates together, which makes the result easier to review.
Are blank lines removed?No. Blank lines are kept as they are and never counted as duplicates, so paragraph spacing in a list survives.
Can I keep the last copy instead of the first?Yes. The option keeps the last occurrence and removes the earlier ones, which suits lists where the newest entry wins.
Are GoA and goa treated as the same line?Only if you tick Ignore capitalisation. By default matching is exact, including capitals and spaces.
Is my list uploaded?No. The comparison happens in this browser tab. Nothing is sent to a server, stored or logged.
Is there a size limit?Only the memory of your device and how long the page takes to redraw. Hundreds of thousands of lines work; millions will be slow.