Remove Duplicate Lines

Delete repeated lines from a list while keeping the first occurrence of each and the original order.

Unique lines
apple
banana
Apple
cherry
Lines kept
4
Lines removed
4
What happened to each line
KeptKept — Lines: 44Duplicates removedDuplicates removed — Lines: 33Blank lines removedBlank lines removed — Lines: 11

Runs entirely in your browser. Nothing you enter is uploaded.

How it works

Paste a list with one item per line — email addresses, keywords, file names, log entries — and every repeat after the first is dropped. The surviving lines stay in their original order, so nothing gets shuffled the way a sort-and-dedupe would.

With trimming on, "banana" and "banana " (with a trailing space) are treated as the same line, and the output is cleaned of leading and trailing spaces. Ignore case makes "Apple" and "apple" duplicates; the first spelling you wrote is the one kept. Removing empty lines also strips blank lines out of the result.

The work happens entirely in your browser, so private lists never leave your device.

Frequently asked questions

Which copy of a duplicate is kept?

Always the first one. Later copies are removed, so the order of the remaining lines matches your original list.

How can I keep only lines that appear once?

This tool keeps one copy of every line. To find lines that are repeated, compare the "removed" count, or sort the list first with the Sort Lines tool so duplicates sit next to each other.

esc