Remove Duplicate Lines

Remove repeated lines from text, keeping the first occurrence.

Private ● Runs entirely in your browser Your text never leaves your device.No account required.No data uploaded.Nothing stored unless you choose to save it.
Result
How are duplicate lines detected?

Two lines are duplicates when they match exactly, character for character. The first time a line appears it is kept; any later identical line is removed. The original order of the surviving lines is preserved.

Does it only remove lines that are next to each other?

No. Duplicates are removed across the whole text, not just consecutive ones. A line near the bottom that matches a line near the top is still removed.

Is the comparison case-sensitive?

Yes. "Apple" and "apple" are treated as different lines. If you want them to match, convert your text to lowercase first, then remove duplicates.

Do leading or trailing spaces affect matching?

Yes. " apple" and "apple" differ because of the spaces. Run Trim Text first if you want lines that differ only in surrounding whitespace to be treated as duplicates.