Skip to content
QKQuickKit日本語
TextLOCALRuns in your browser

Duplicate Line Remover

Remove repeated lines from text in the browser while preserving order, with case and whitespace options.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Result

How it works

Keep-first and keep-last remove extra copies but keep one of each line. Unique-only keeps just the lines that never repeat. Order is otherwise preserved, and each kept line is output exactly as written: the options below change only how lines are compared.

Example: the seven lines apple, Apple, "apple " (with a trailing space), a blank line, banana, a blank line, and apple. With the defaults (case-sensitive, whitespace counted, blank lines kept), keep-first gives apple, Apple, "apple ", a blank line, banana: the last apple and the second blank line are removed. Turning off case-sensitive also removes Apple, and turning on ignore whitespace also removes "apple ". Keep-last gives Apple, "apple ", banana, a blank line, apple. Unique-only gives Apple, "apple ", banana.

Comparison rules: ignoring whitespace trims each line and treats every run of whitespace inside it as one space, including tabs, the no-break space, and the full-width (ideographic) space. Case-insensitive comparison uses simple lowercase mapping, so Straße and STRASSE still differ. Unicode normalization is not applied, so é typed as one character and e followed by a combining accent are different lines. With keep blank lines on, a blank line is compared like any other line, so repeated blank lines are reduced to one (none with unique-only); turn it off to drop every blank or whitespace-only line. Lines may end in LF, CRLF, or CR; the result uses LF.