How to Remove Duplicates and Clean Up Lists Fast

By • 28 October, 2026 • Productivity • 8 minutes read

Remove duplicate lines, sort lists, extract emails and change separators online, in Excel or in Google Sheets, with tips to catch hidden duplicates.

Messy lists are everywhere: email addresses exported from three different tools, a product list with repeated SKUs, keywords pasted from several reports, survey answers, attendee names, URLs scraped from a page. Before you can use them, you need to remove duplicates, sort them, and often pull the useful bits out of a block of text. This guide shows the fastest ways to clean up lists online, in Excel and in Google Sheets, plus a few tricks that save a surprising amount of time.

Option 1: Clean a list online in seconds

If your list is in plain text, with one item per line, an online tool is often the quickest route because there's nothing to set up.

Remove duplicate lines

  1. Paste the list into the duplicate lines remover.
  2. Submit. Each line is kept only once, in the order it first appeared.
  3. Check the totals for how many lines you started with and how many duplicates were removed, then copy the result.

One catch: duplicates must match exactly. Apple, apple and apple (with a trailing space) count as three different lines. If your data is inconsistent, normalize it first. Convert everything to lowercase with the case converter, especially for email addresses, which are effectively case-insensitive in practice.

Sort the list

Paste the cleaned list into the list alphabetizer to sort it A–Z or Z–A. Alphabetical order also makes near-duplicates easy to spot, because Jon Smith and John Smith end up next to each other.

Reverse or shuffle it

Need the opposite order, like the newest entries first? Use reverse list. Need a fair random order for a giveaway, a presentation running order or study flashcards? Use the list randomizer.

Option 2: Remove duplicates in Excel

The Remove Duplicates button

  1. Select your data range, or click any cell inside a table.
  2. Go to the Data tab and choose Remove Duplicates.
  3. Tick the columns that define a duplicate. For example, tick only "Email" to remove repeated email addresses even if the names differ.
  4. Click OK. Excel tells you how many duplicates it removed and how many unique values remain.

This changes your data in place, so work on a copy if you might need the original.

The UNIQUE function

In Excel for Microsoft 365 and Excel 2021 or newer, =UNIQUE(A2:A500) returns a list of distinct values without touching the original. Combine it with sorting: =SORT(UNIQUE(A2:A500)).

Highlight duplicates instead of deleting them

If you want to review duplicates first, select the column and use Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values.

Option 3: Remove duplicates in Google Sheets

  1. Select the range.
  2. Choose Data → Data cleanup → Remove duplicates.
  3. Choose whether your data has a header row and which columns to compare, then confirm.

Google Sheets also has =UNIQUE(A2:A) and =SORT(UNIQUE(A2:A)). And Data → Data cleanup → Trim whitespace removes stray spaces that stop duplicates from matching, which is worth doing first.

Sometimes the list doesn't exist yet. It's buried in an email thread, a document, a web page's source or a CSV with extra columns.

  • The email extractor finds every email address in any block of text and lists them, one per line.
  • The URL extractor does the same for web links, which is handy for auditing the links in a newsletter or a page's HTML.

Then run the results through the duplicate remover and the alphabetizer, and you have a clean list in under a minute. Only email people who agreed to hear from you, though. Extracting an address doesn't give you permission to market to it, and privacy laws such as the GDPR and CAN-SPAM set rules for that.

Split, join and reformat lists

Different tools want lists in different shapes. A spreadsheet wants one item per line, Outlook wants email recipients separated by semicolons, and some import fields want items separated by pipes or spaces. The text separator converts between new lines, spaces, semicolons, dashes, pipes and dots in one step. For example:

  • Turn a column of email addresses into a@example.com;b@example.com for an email To field.
  • Turn a space-separated list of tags or keywords into one item per line for a spreadsheet.
  • Turn a pipe-separated export (red|green|blue) into a readable list.

Need commas instead? Spreadsheets handle that well: =TEXTJOIN(", ", TRUE, A2:A100) joins a column with commas in both Excel and Google Sheets, and =SPLIT(A2, ",") in Google Sheets (or Data → Text to Columns in Excel) splits a comma-separated cell into columns. If you're preparing values for a database query, the SQL formatter makes the final query readable.

Clean up formatting problems first

Many "duplicates that won't go away" are caused by invisible differences. Before deduplicating, check for:

  • Leading and trailing spaces. Use TRIM in spreadsheets or Trim whitespace in Google Sheets.
  • Different capitalization. Normalize with the case converter or the LOWER function.
  • Leftover HTML from copying web content. Strip it with the HTML tags remover.
  • Emoji and symbols in names or social handles. Remove them with the emoji remover if your system can't handle them.
  • Different line endings from Windows and Mac files, which can make lines look identical but not match. Pasting through a plain-text tool usually normalizes them.

Real-world examples

Merging newsletter subscriber exports

Export emails from each source, paste them all into one list, convert to lowercase, remove duplicates and sort. Then import into your email platform, which will usually also skip existing subscribers.

Building a keyword list for SEO

Combine keyword exports from several tools, remove duplicates, sort alphabetically to group variations, then decide which page should target each group.

Preparing a giveaway

Collect entrant names or handles, remove duplicates so nobody gets extra chances, then use the list randomizer or random number generator to pick a winner fairly. Take a screenshot of the result for transparency.

Cleaning a product catalog

Use Excel or Google Sheets' Remove duplicates on the SKU column, then sort by category and name. Highlight duplicates first if the rows might hold different prices.

Build a repeatable cleanup routine

If you clean the same kind of list every week, such as new signups, leads from a form or keyword exports, write the steps down once and follow them each time. A typical routine looks like this:

  1. Collect everything into one place: one spreadsheet tab or one plain-text file.
  2. Extract only what you need, such as email addresses or links, if the data is mixed with other text.
  3. Normalize: trim spaces, fix capitalization and remove stray HTML or symbols.
  4. Deduplicate on the field that really defines a duplicate, such as the email address or SKU.
  5. Sort so the list is easy to scan and near-duplicates stand out.
  6. Reformat to the separator or layout the destination expects.
  7. Check the before and after counts, then save the cleaned version with the date in its file name.

Following the same order every time prevents the classic mistake of deduplicating before trimming spaces, which leaves hidden duplicates behind.

Quick tips

  • Keep the original list. Clean a copy so you can always go back.
  • Do one thing at a time: normalize, then deduplicate, then sort.
  • Count before and after with the character counter or the duplicate remover's totals to confirm nothing important went missing.
  • For huge lists, with hundreds of thousands of rows, a spreadsheet or a script handles the volume better than pasting into a browser.

Frequently asked questions

How do I remove duplicate lines from text?

Paste the text into an online duplicate lines remover, or into a spreadsheet column and use Remove duplicates or the UNIQUE function.

Why aren't my duplicates being removed?

The lines probably aren't identical. Extra spaces, different capitalization or invisible characters make them different. Trim and normalize the case first.

Does removing duplicates change the order?

Online duplicate removers usually keep the first occurrence of each line in its original order. Spreadsheet tools keep the remaining rows in place.

How do I remove duplicates but keep a count of each item?

In a spreadsheet, use a pivot table or COUNTIF next to a UNIQUE list to see how many times each value appeared.

Can I alphabetize a list in Word or Google Docs?

Word has a Sort button on the Home tab for paragraphs. For Google Docs, the quickest route is to paste the list into a list alphabetizer or a spreadsheet, sort it, and paste it back.