Skip to content
ToolsNow
Guides All tools
Text

Remove duplicate lines from a list

Paste a list and get it back with every repeat removed, keeping the first occurrence of each line. Useful for email lists, keyword exports and log files.

Runs in your browser — your input is not uploaded to ToolsNow.

Your list
0 chars0 words0 lines
Unique lines
0 chars0 words0 lines

How to use

  1. Paste your list. One item per line.
  2. Choose how to compare. Turn off case sensitivity to treat "Apple" and "apple" as the same line. Leading and trailing spaces are ignored when comparing.
  3. Read the count and copy. The tool reports how many lines it removed and how many unique ones remain.

Questions

Which duplicate is kept?

The first occurrence, in the original order. The remaining lines stay in the order you pasted them unless you switch on sorting.

Are "Apple" and "apple" duplicates?

Only if you turn off case sensitivity. By default they are treated as different lines.

What about lines that differ only in spacing?

Leading and trailing whitespace is ignored when comparing, so " apple" and "apple" are treated as the same line. Differences in the middle of a line still count as different.

Is there a size limit?

Only your device’s memory. Lists of tens of thousands of lines are fine on a normal laptop, because the work happens locally rather than being uploaded.

Examples and checks

Deduplication is useful for repeated list entries, but the comparison rules decide which entries count as identical. Review the removed count before using a cleaned mailing list, reference list or export.

Keep the first occurrence

Input or situation
apple pear apple
Result
apple pear

The first apple remains in its original position; the later identical line is removed.

Check letter case

Input or situation
Apple apple
Result
Two entries when case-sensitive; one when case is ignored.

Use case-sensitive comparison for identifiers where capitalization matters. Display names may need a different rule.

Before you use the result

Published by ToolsNow. How tools and sources are checked · Report a problem

Read more

Related tools