Remove Duplicate Lines

Remove duplicate lines from a list, or show only the lines that repeat.

Keep
0 words · 0 charactersNot uploaded

Deduplicate any list

Paste a list (emails, keywords, product codes, names) and every repeated line is removed, keeping the original order.

Options

  • Keep first or last copy: keeping the last copy is useful when later entries are more up to date.
  • Ignore case: treats “Apple” and “apple” as duplicates.
  • Ignore surrounding spaces: “ apple ” and “apple” match. On by default, because stray spaces are the usual reason duplicates survive.
  • Keep blank lines: blank lines aren’t treated as duplicates of each other, so paragraph spacing survives.

Find the duplicates instead

Switch Show to Only duplicated lines to list each repeated value once (handy for checking which records appear twice) or Only lines that appear once to find the unique stragglers.

Everything runs locally, so this is safe for customer lists and other personal data. For keyword lists specifically, the Keyword List Cleaner also normalises spacing and symbols before deduplicating.

Worked example

Here is what the Remove Duplicate Lines returns for its built-in example. Settings used: Show: Deduplicated list; Keep: First copy; Ignore case: off. Click Try an example in the tool above to load it, then change it as you like.

Input
apple
Banana
apple
cherry
banana
  apple  
date
Output
apple
Banana
cherry
banana
date

Related tools: Sort Lines, Remove Empty Lines.

Questions

How do I remove duplicates but keep the order?

This tool keeps the original order and removes later copies of each line. Choose “Last copy” to keep the final occurrence instead.

Can I see which lines were duplicated?

Yes. Set “Show” to “Only duplicated lines”.

Last reviewed · How Textkiln tools work