Skip to content

Duplicate Remover

Mode
More options
Cleaned text
—
Repeats removed
—
Kept
—

Paste your text, pick Duplicate lines or Duplicate words, and every later repeat is removed while the first copy stays where it was. A five-line email list holding ana@example.com three times, once as Ana@, comes back as three unique addresses with 2 repeats removed.

About this tool

Exported contact lists, log files, keyword sets and columns copied out of a spreadsheet tend to collect the same entry several times. This remover reads your text either line by line or word by word, keeps the first occurrence of each entry and drops the rest, so the original order is never shuffled the way a sort would shuffle it. By default Apple and apple count as one entry and stray spaces at the ends of a line are ignored; tick Match case when capital letters carry meaning, such as product codes. A table lists which entries repeated and how often. One limit: the comparison is exact after those two adjustments, so near-matches like colour and color, or a trailing full stop on one line, are treated as different entries.

How to use it

  1. Add the text

    Paste a list or paragraph, or open a .txt, .csv or .log file from your device.

  2. Pick lines or words

    Duplicate lines treats each line as one entry; Duplicate words compares single words.

  3. Set matching

    Tick Match case to keep capitalised variants apart. Under More options, choose how line-end spaces and empty lines are handled.

  4. Copy the cleaned text

    Copy the result box and check the table of repeated entries to see what was removed.

Examples

A mailing list with repeated addresses

Mode
Duplicate lines
Your text
ana@example.com bo@example.com Ana@example.com ana@example.com cy@example.com

Result Cleaned text: ana@example.com
bo@example.com
cy@example.com
Repeats removed: 2
Kept: 3

  1. Read 5 lines, comparing without case.
  2. Kept the first copy of each and dropped 2 later repeats, leaving 3 lines.

Ana@example.com and ana@example.com count as one address because case is ignored, so two repeats go and the first spelling stays.

Doubled words in a sentence

Mode
Duplicate words
Your text
the the cat sat on the mat, mat

Result Cleaned text: the cat sat on mat,
Repeats removed: 3
Kept: 5

  1. Read 8 words, comparing without case.
  2. Kept the first copy of each and dropped 3 later repeats, leaving 5 words.

Later copies of the and mat are dropped. Punctuation is ignored when comparing, so mat, and mat count as the same word.

A keyword list with repeats

Mode
Duplicate words
Your text
shoes Shoes running shoes trail running

Result Cleaned text: shoes running trail
Repeats removed: 3
Kept: 3

  1. Read 6 words, comparing without case.
  2. Kept the first copy of each and dropped 3 later repeats, leaving 3 words.

Each keyword is kept once, in the order it first appears, which helps when tidying tag or keyword fields.

How it is calculated

Keep rule: an entry is kept only if no earlier entry has the same comparison key; key = entry, lowercased unless Match case, trimmed in line mode

The text is split into entries: lines at each line break (Windows CRLF and old Mac CR breaks are normalised first), or words at runs of whitespace. Each entry gets a comparison key. In line mode the key drops spaces at both ends when that option is on; in word mode punctuation at the start and end of a word is stripped for comparing, so mat, matches mat, while the kept word keeps its punctuation. Letters are compared in lowercase unless Match case is ticked. The first entry with each key is written out and every later one is counted as a repeat. Empty lines are never treated as repeats of each other, so paragraph spacing survives unless you choose to remove empty lines. Word mode rejoins the kept words with single spaces.

Use from code or an AI agent Free API · MCP

The same calculation is a free JSON API. No key needed. The answer is in result.stats.primary.

curl -X POST https://api.tools-directory.workers.dev/v1/tools/duplicate-remover \
  -H 'Content-Type: application/json' \
  -d '{"inputs":{"mode":"lines","text":"ana@example.com\nbo@example.com\nAna@example.com\nana@example.com\ncy@example.com"}}'

When not to use it

  • Spotting near-duplicates such as typos or color versus colour; only identical entries are merged.
  • Cleaning a spreadsheet row by several columns at once; Excel's Remove Duplicates handles column choice.
  • Word mode on formatted text where line breaks matter, since kept words are rejoined on one line.

Common mistakes

  • Leaving Match case on for email addresses, which keeps Ana@ and ana@ as two entries.
  • Pasting a CSV in line mode and expecting single cells to be compared instead of whole rows.
  • Forgetting that a trailing comma or full stop on one line makes it a different line.

Frequently asked questions

How do I remove duplicate lines from a list?

Paste the list, keep the Duplicate lines mode, and the result box shows each line once in its original order. By default capital letters and spaces at the ends of a line are ignored when comparing, so Apple and apple merge. The table underneath shows which lines repeated and how many times.

How do I remove duplicate lines in Excel?

In Excel, select the column and use Data, then Remove Duplicates. For a quick pass without changing the workbook, copy the column, paste it here in Duplicate lines mode, and paste the cleaned result back. Each copied cell arrives as one line, and the first copy of each value keeps its position.

How do I remove duplicate words from text?

Switch to Duplicate words and paste the text. Every word after its first appearance is dropped, and punctuation at word edges is ignored when comparing, so mat and mat, count as the same word. The kept words are joined with single spaces, which suits keyword and tag lists better than formatted prose.

How do I remove duplicate lines in Notepad++?

Notepad++ offers Edit, Line Operations, Remove Duplicate Lines, which compares case exactly. If you need case-insensitive matching or want to see a count of what repeated, copy the file contents here, pick Duplicate lines, and paste the cleaned text back into the editor.

How do I remove duplicate lines from a file in Linux?

On Linux, awk '!seen[$0]++' file keeps the first copy of each line without sorting, while sort -u also reorders the lines. This page does the same as the awk command for a file you open from your device, and it can ignore case and line-end spaces, which plain awk does not.

How can I remove duplicate words and repeated keywords from a keyword list?

Use Duplicate words mode with Match case off. A list such as shoes Shoes running shoes trail running comes back as shoes running trail, with 3 repeats removed. If your keywords are multi-word phrases, put one phrase per line and use Duplicate lines instead, so phrases are compared whole.

How do I remove duplicate lines in VS Code?

Recent VS Code versions include a Delete Duplicate Lines command in the Command Palette, which works on the selection. When you also need case-insensitive matching, blank-line removal, or a count of repeats, paste the lines here and copy the cleaned result back into the editor.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, November 30). Duplicate Remover. Tools Directory. Retrieved December 4, 2026, from https://directory.milunir.com/text-tools/text-formatting/duplicate-remover/

MLA

Tools Directory Editorial Team. “Duplicate Remover.” Tools Directory, 30 Nov. 2026, https://directory.milunir.com/text-tools/text-formatting/duplicate-remover/. Accessed 4 Dec. 2026.

Chicago

Tools Directory Editorial Team. “Duplicate Remover.” Tools Directory. Last modified November 30, 2026. Accessed December 4, 2026. https://directory.milunir.com/text-tools/text-formatting/duplicate-remover/.

Link<a href="https://directory.milunir.com/text-tools/text-formatting/duplicate-remover/">Duplicate Remover – Tools Directory</a>