Writing

Remove Duplicate Lines

Clean up lists, logs, and exports by removing repeated lines. Choose to keep the first occurrence of each line or keep only lines that appear exactly once, and optionally compare lines case-insensitively or after trimming whitespace. The summary shows how many lines were removed and how many remain.

Examples

Input · Keep-first mode, case-sensitive.
apple
Apple
banana
apple
Output
apple
Apple
banana

How to use Remove Duplicate Lines

Paste your lines
Drop in any list or block of text with repeated lines.
Pick a mode
Keep the first occurrence of each line, or keep only lines that appear once.
Refine matching
Toggle case-insensitive and trim options to control what counts as a duplicate.

Why use this tool

Two modes: keep-first or unique-only
Optional case-insensitive matching
Optional whitespace trimming before comparison
Live summary of removed and remaining lines

Frequently asked questions

Keep-first keeps the first time each line appears; keep-unique-only keeps lines that occur exactly once and drops anything repeated.

Yes. Enable the case-insensitive and trim toggles to treat lines that differ only by case or surrounding whitespace as duplicates.

Discussion

Share feedback or ask a question about this tool.

Comments are stored to a moderated queue via the API.