Removes duplicate lines, keeping the first occurrence.
Deduplicate Lines removes duplicate lines from a block of text, keeping the first occurrence of each unique line and discarding the rest. It's handy for cleaning up lists, log files, word lists, or any line-based data where you need distinct entries. Optional toggles let you trim surrounding whitespace and compare lines case-insensitively before deciding what counts as a duplicate.
No. This tool runs entirely in your browser and nothing is uploaded. Your text never leaves your device.
Yes. It keeps the first occurrence of each unique line in the order it appears and removes later duplicates, so the surviving lines stay in their original sequence.
When enabled, leading and trailing whitespace is stripped from each line before comparison, so lines that differ only by surrounding spaces or tabs are treated as duplicates. The trimmed version is what appears in the output.
With 'Case-insensitive' on, lines are compared after lowercasing, so "Hello" and "hello" count as the same. The first occurrence is kept with its original casing.
Lines are split on newline characters. Empty lines count as content, so multiple blank lines are also deduplicated down to a single blank line.