Remove Duplicate Lines
Paste a list and remove repeated lines. Choose whether to keep the first or last occurrence and how strictly lines should be compared.
Runs entirely in your browser — your text is never uploaded
Result · 0 duplicate lines removed
How to use Remove Duplicate Lines
- Paste your list, one item per line.
- Choose keep first or keep last, and whether matching ignores case.
- Optionally trim whitespace and drop blank lines.
- Copy the cleaned list.
Examples
Input
apple / banana / apple
Result
apple, banana — 1 duplicate removed
Input
Email list with mixed casing
Result
Enable ignore case to catch more duplicates
What you can type into Remove Duplicate Lines
- One item per line
- Lines are compared whole. Commas and semicolons inside a line are just characters, not separators.
- Exact matching by default
- Two lines are duplicates only when they are character-for-character identical, so "Apple" and "apple" both survive.
- Ignore case
- Switch it on to treat Apple, APPLE and apple as the same item. The version that is kept keeps its original capitalisation.
- Trim whitespace
- Removes leading and trailing spaces before comparing, which catches duplicates that differ only by an indent or a stray space.
- Remove empty lines
- Drops blank lines entirely instead of keeping one of them.
How the results behave
- Order is preserved
- Nothing is sorted. Remaining lines stay in their original order, minus the removals.
- Keep first or keep last
- Keep first preserves the earliest appearance; keep last keeps the final one, which suits exports where later rows are more recent.
- Removal count
- The number of removed lines is reported so you can sanity-check the result against what you expected.
Tips
- Turn on trim and ignore case together for pasted email or keyword lists — that combination catches most real duplicates.
- Deduplicate first and sort afterwards if you want a clean alphabetical list.
Common mistakes
- Expecting near-duplicates to be caught: "john@site.com" and "john@site.com." are different lines.
- Assuming the result is sorted. It is not — use the sort lines tool for that.
About the remove duplicate lines
Anyone cleaning an exported list: email addresses, keywords, tags, log samples, spreadsheet columns or a pasted CSV field.
Deduplication is a routine cleanup step for email lists, keyword exports, log samples, tag lists and CSV columns. Doing it in a spreadsheet takes several steps; here it is one paste.
Keeping the last occurrence is useful when later rows are the more recent version of an entry; keeping the first preserves original ordering.
Accuracy and limitations
- Matching is textual, so there is no fuzzy or partial-similarity detection.
- Everything runs in your browser, which means large lists are fast and your data is never uploaded.
Frequently asked questions
Is the original order preserved?
Yes. Lines stay in their original order minus the removed duplicates.
Can it handle large lists?
Comfortably — tens of thousands of lines process instantly because the work happens in your browser.
Read more
Related tools
Sort Lines Alphabetically
Sort lines A–Z, Z–A, by number or by length.
Open toolCase Converter
Convert text to upper, lower, title, sentence, camel, snake or kebab case.
Open toolWord Counter
Count words, characters, sentences, paragraphs and reading time.
Open toolCharacter Counter
Count characters with and without spaces in real time.
Open tool