text TOOL / NO ACCOUNT NEEDED

Remove Duplicate Lines

Keep the first occurrence of each line and remove repeated entries.

YOUR TEXTProcessed in this tab
Up to 500,000 UTF-16 units per input. No drafts are saved.

Keeps the first occurrence and original order. Trimming also trims output; ignoring case changes comparison only. Blank lines count as entries unless removed.

Paste text to see the result.

Exact matching is predictable

By default, a line must match exactly, including capitalization and surrounding spaces. Turn on trim or ignore case only when those differences should not distinguish entries. The output retains the first occurrence.

Blank lines also count as entries, so repeated blank lines collapse to one unless you choose to remove empty lines. Order is preserved; this is not a sorting tool.

Decide what counts as the same entry

Exact matching keeps Apple, apple, and a line with surrounding spaces separate. Enable Ignore letter case only when capitalization carries no meaning. Enable Trim lines before comparing only when leading and trailing whitespace should be removed from the retained output.

apple
pear
apple
Decide what counts as the same entry
Default resultReason
appleFirst occurrence retained
pearNext distinct entry retained

Use deduplication on records with clear boundaries

Use one complete item per line. This is not a CSV parser: a quoted multiline field occupies multiple lines and can be damaged by deduplication. The tool does not merge similar names, normalize Unicode spellings, or sort results.

Input is limited to 500,000 UTF-16 units. Copy or download the separate result; Clear restores the initial options.

Frequently asked questions

Will the list be sorted?

No. Retained entries keep the order of their first occurrence.

What happens to blank lines?

Repeated blank lines collapse to one by default. Remove empty lines removes them altogether.

Does trim only affect matching?

No. With trimming enabled, the retained output lines are trimmed too.