How to Remove Duplicate Lines From a List (Online, Excel and Google Sheets)

By the Tooliday Team. Last updated 14 November 2026.

Lists collect repeats very quickly: email addresses pasted from several sources, keyword lists, product codes, names from a sign-up sheet. Removing the repeats by eye is slow and easy to get wrong. This guide shows three simple ways to do it, and explains why two lines that look the same are sometimes treated as different. For a quick fix, use our Remove Duplicate Lines tool.

Method 1: An online tool

  1. Paste your list with one item per line.
  2. Choose whether to ignore case, trim spaces, remove blank lines and sort.
  3. Run the tool and copy the cleaned list.

This is the fastest way for plain text. The first copy of every line is kept, and later copies are removed.

Method 2: Excel

  1. Select the column that holds your list.
  2. Open the Data tab and choose Remove Duplicates.
  3. Confirm the column and select OK. Excel tells you how many duplicates were removed.

Method 3: Google Sheets

  1. Select the column.
  2. Open the Data menu, choose Data cleanup, then Remove duplicates.
  3. Choose the column and confirm.

Both Excel and Sheets treat “Apple” and “apple” as the same entry, while a plain text tool may treat them as different unless you tell it to ignore case. Check the option you need.

A worked example

Imagine this list, one entry per line: Apple, apple, Banana, Banana, Cherry, Apple. It has 6 lines.

  • Exact matching keeps Apple, apple, Banana and Cherry. That is 4 lines.
  • Ignoring case keeps Apple, Banana and Cherry. That is 3 lines.

Why lines that look the same are not removed

  • Extra spaces. “Banana” and “Banana ” (with a space at the end) are different until you trim spaces.
  • Different case. “Apple” and “apple” differ unless case is ignored.
  • Similar characters. A hyphen and a longer dash look alike but are different characters.
  • Hidden characters. Text copied from web pages or PDFs can carry invisible characters, and these make identical-looking lines different.

Good habits before you clean a list

  • Keep a copy of the original list before you remove anything.
  • Trim spaces first, then compare.
  • Decide whether sorting is needed. Removing duplicates without sorting keeps your original order.
  • Check the line count before and after so you know how much was removed.

Try it yourself

Paste your list into the Remove Duplicate Lines tool and try the options. It runs in your browser, so your list is not uploaded. To change the letter case of the cleaned list, use the Case Converter.