Duplicate Line Remover

Strip duplicate lines from pasted text and keep only the unique ones.

This free online duplicate line remover cleans up lists, email addresses, log files, and CSV exports by removing repeated lines. Choose case-sensitive or case-insensitive matching, decide whether to keep the first or last occurrence, and optionally ignore leading/trailing whitespace. No signup required, runs entirely in your browser.

Case-sensitive

When off, "Apple" and "apple" are treated as the same line.

Keep occurrence

Trim whitespace before comparing

Ignores leading/trailing spaces when comparing lines (the original spacing is still kept in the output).

Input
Output

Frequently asked questions

Paste your text above. The tool keeps one copy of each unique line and removes the rest, updating the result instantly. Use the options to control how lines are compared and which occurrence is kept.
With case-sensitive comparison, "Apple" and "apple" are treated as different lines and both are kept. With case-insensitive comparison, they're treated as duplicates and only one is kept.
Keep first preserves the original order of first appearance, which works well for most lists and log files. Keep last is useful when later entries (like updated CSV rows or newer log lines) should take priority over earlier ones.
Data exported from spreadsheets or copied from PDFs often has stray leading or trailing spaces. Without trimming, "[email protected]" and " [email protected]" look different and both survive. Turning on trim treats them as the same line.
No. Everything runs locally with JavaScript in your browser. Nothing is uploaded or stored on a server.