Remove Duplicate Lines
Remove duplicate lines while preserving the first occurrence.
Kept: 2 • Removed: 2
Input
Output
apple banana
Was this page helpful?
Related tools
About Remove Duplicate Lines
Remove duplicate lines from a list, with options to sort, trim, and ignore case. Ideal for cleaning up email lists, log lines, keyword lists, or any line-based data.
How to use
- Paste your list, one item per line.
- Choose whether to sort, trim whitespace, or ignore case when comparing.
- Copy the de-duplicated output.
Frequently asked questions
- Does it keep the original order?
- Yes by default — the first occurrence of each line is kept and later duplicates are removed, unless you enable sorting.
- Are blank lines removed?
- Blank lines collapse to a single entry, and trimming helps treat " item" and "item" as duplicates.