ToolFox

Duplicate Line Remover

Remove duplicate lines from a list while keeping the first occurrence of each line, in order.

Deduped text

How it works

Each line of your text is compared against every line seen so far; the first time a line appears it is kept, and any later repeat of the exact same line is dropped. The case-insensitive mode compares lines after lowercasing them (so "Apple" and "apple" count as the same line) but keeps the original casing of whichever occurrence came first — the order of the remaining lines is never changed.

Example

Pasting the five lines a, b, a, c, b (one per line) produces just three lines — a, b, c — each kept once, in the order it first appeared; handy for cleaning up an email list or a log file with repeated entries.

Frequently asked questions

Does it preserve the original order?

Yes — the first occurrence of each line stays exactly where it was; nothing is re-sorted, only later repeats are removed.

What counts as a duplicate in case-insensitive mode?

Lines that are identical once lowercased, such as "Apple" and "apple" — the version that appears first in the text is the one kept, casing included.

Does it ignore leading or trailing spaces?

No — lines are compared exactly as typed (aside from case, in case-insensitive mode), so " apple" and "apple" are treated as different lines.

Is my text uploaded anywhere?

No — deduplication runs entirely in your browser as you type.

Related tools