← All tools

Line Deduplicator

Remove duplicate lines from a list, or find them. Paste any multi-line text and choose how duplicates are identified (case-sensitive, trimmed whitespace), which occurrence to keep (first or last), and what to output — unique lines, only the duplicated ones, or every line with a count. Everything runs locally in your browser.

Input

Output
Keep

Result

Each input line gets a comparison key: optionally trimmed of surrounding whitespace and/or lower-cased. Lines sharing a key are duplicates. Keep first/last chooses which physical line is emitted among equal keys (output order always follows first appearance). Unique emits one line per key; Duplicates only emits only keys that appeared two or more times; All with counts emits one line per key prefixed with its occurrence count and a tab. Ignore empty lines drops blank lines entirely (otherwise blank lines are treated as a normal line, so repeated blanks collapse to one). The trailing newline of the input is treated as a terminator, not as an extra blank line. Pairs with the line sorter and line numberer. Everything runs locally — nothing leaves your browser.