Home Tools Blog About

Deduplicate List

In short

Removes duplicate items from a list of lines, emails or comma separated values. It can also show only the items that repeat, with how many times each appears, or only the items that appear once.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

One item per line, or pick another separator below. You can also drop a text file here.

Your list is processed in this browser tab and is not uploaded.

🛡
Private by designYour files and text stay in this tab
⚡
Runs in your browserNo waiting for a server
💧
No watermarksClean output you can use
🆓
FreeNo account needed

How to Use Deduplicate List

Deduplicate List · free online tool · All Tools Verse
The Deduplicate List tool, as it looks in your browser.
  1. Paste your list, open a text file, or drop one on the box. Pick the separator if items are not one per line.
  2. Choose What to keep: each item once (first or last copy), only items that repeat, only items that appear once, or a cleanup of repeats that sit next to each other.
  3. Decide how strict the match is: ignore upper and lower case, ignore spaces at the ends, and drop empty items.
  4. Copy the result or download it as a .txt file. The table under the tool lists every repeated item and its count.

Example: cleaning a mailing list

This list was pasted from two sign-up sheets. Some names and emails were typed with different capitals, one has a trailing space, and there is a blank line:

Ana
[email protected]
ana
Carlos
[email protected] 

dana
carlos
ana

With the default settings (keep the first copy, ignore case, ignore spaces at the ends, drop empty items) the result is:

Ana
[email protected]
Carlos
dana

The status line reads: 9 items in, 4 out. 4 removed (50%). 4 different items, 3 of them repeat. 1 empty dropped. Switch What to keep to Only items that repeat and the output becomes a count of the culprits:

Ana (3)
[email protected] (2)
Carlos (2)

Only items that appear once gives dana, the one contact that was not entered twice.

Which option gives which result

All six options run on the same eight items, a a b a a a c c. The last column shows the command line tool that gives the same answer, in case you need it in a script.

What to keep Result Same as
Each item once, keep first copy a, b, c awk '!seen[$0]++'
Each item once, keep last copy b, a, c tac | awk '!seen[$0]++' | tac
Only items that repeat (with counts) a (5), c (2) sort | uniq -d (sorted, no counts)
Only items that appear once b sort | uniq -u
Remove repeats next to each other a, b, a, c uniq
At most 2 repeats in a row a, a, b, a, a, c, c no single command

Keeping the last copy matters when the list is in time order and the newest entry is the one you trust. The two “in a row” options leave the order alone and only touch runs, which suits log files and sensor readings where the same value can come back later.

How it works

  • The text is split into items by the separator you choose. A final line break does not create an extra empty item.
  • Each item gets a comparison key. Ignoring case lowercases the key, ignoring spaces trims it, and the Unicode option converts it to NFC, so an “é” typed as one character matches an “e” followed by a combining accent.
  • Only the key is changed. The item you see in the result is the original text of the copy that was kept, which is why the first example keeps “Ana” with a capital.
  • Counts in the report and in the “(3)” suffix always refer to the whole list, not just a run.
  • Sorting uses natural order, so item2 comes before item10.

Limits

  • Items are compared as whole values. “Ben” and “Ben Smith” are different items, and the tool does not guess near matches or typos.
  • For CSV rows it compares the full row. To remove rows that share one column, extract that column first, or sort the file in a spreadsheet.
  • Text is processed in the browser, so very large files (hundreds of MB) are better handled with the commands in the table. A 200,000 line list takes well under a second here.

Frequently asked questions

How do I remove duplicates but keep the original order?

Leave Order on Original order, which is the default. The first copy of each item stays where it was and later copies are removed, so nothing gets shuffled.

How can I see which items are duplicated and how many times?

Pick Only items that repeat. Each repeated item is listed once with its total count, for example “apple (3)”. The table under the tool shows the same counts, sorted from most to least repeated, and Copy report gives them as tab separated text for a spreadsheet.

Why were “Apple” and “apple” treated as the same item?

Ignore upper and lower case is on by default because most lists of names, tags and emails should match that way. Turn it off when capitals carry meaning, such as product codes or passwords.

Is there an Excel formula for this?

In Excel 365 and Google Sheets, =UNIQUE(A1:A100) keeps one copy of each value, and =UNIQUE(A1:A100,,TRUE) returns only the values that appear exactly once. This page gives the same results without a spreadsheet and adds counts, case options and the in-a-row cleanups.

Next steps

Keep working with your list

Keep going

Related Tools

All Text tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: