Duplicate Lines Remover

Remove duplicate lines while keeping the first occurrence and preserving the original order. Text is processed in your browser.


Options

Input lines: 0 | Unique lines: 0 | Duplicates removed: 0

How This Converter Works

Removes repeated lines while keeping the first occurrence and original order. Matching is case-sensitive by default; optional settings ignore case, ignore leading and trailing whitespace, or remove blank lines.

Formula or rule

Split on CRLF, LF, or CR; create a comparison key for each line using the selected options; keep the first line for each unseen key.

Example

Input
apple
banana
apple
Calculation
The second apple has the same comparison key as the first and is removed.
Result
apple
banana