GWN Tools · Text

Remove Duplicate Lines

Paste a list to delete repeated lines while keeping the first occurrence. Everything runs in your browser.

Input lines: 0 Unique lines: 0 Removed: 0
Result

Your text never leaves your device — all processing happens locally.

About removing duplicate lines

This tool removes duplicate lines from your text while keeping the first occurrence, and it can match case-insensitively, ignore surrounding whitespace, and sort the unique lines, all while showing how many were removed.

How does this tool remove duplicate lines?

The tool reads your text line by line and keeps the first time each line appears, dropping any later repeats. The original order of the surviving lines is preserved, and it shows how many duplicate lines were removed.

What do the case-insensitive and trim-whitespace options do?

Case-insensitive treats lines like 'Apple' and 'apple' as the same line when matching. Trim-whitespace ignores leading and trailing spaces when comparing, so ' apple' and 'apple' are also seen as duplicates.

Can it sort the lines as well as remove duplicates?

Yes. Turn on the also-sort option and the remaining unique lines are arranged in alphabetical order after duplicates are removed. Leave it off to keep the lines in their original order with the first occurrence preserved.