Remove Duplicate Lines
Remove duplicate lines from a list, with options to sort, trim whitespace, ignore case and drop empty lines. Useful for cleaning up email lists, log files, keyword lists and CSV columns.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to remove duplicate lines
- 1
Paste your list
One item per line — emails, URLs, keywords, anything.
- 2
Choose your options
Sort, trim, ignore case, or keep only the lines that appear more than once.
- 3
Copy the result
The count of removed lines is shown so you know what changed.
Why "first occurrence kept" is the sensible default
When a list contains several copies of the same line, there has to be some rule for which copy survives, and keeping the first is the choice that preserves the most information about the original list: the surviving order still reflects however the list was originally assembled, rather than being scrambled by the deduplication step itself. This matters concretely for a list that was originally in a meaningful order — entries added chronologically, or already sorted by some external process — where deduplicating without disturbing that order keeps the result usable in the same way the original was, just without the repeats.
Turning on sorting afterwards is a separate, deliberate step precisely because it discards that original ordering in favour of alphabetical order, which is the right choice when the original order carried no meaning worth preserving — a jumbled export from several sources, for instance — and the wrong choice when it did.
What "ignore case" changes and what it does not
"Ignore case" changes only how two lines are compared to decide whether they are duplicates — Apple, APPLE and apple are treated as the same entry under this setting, and whichever one appeared first in the list is the one that survives, complete with its own original capitalisation intact. This is a comparison-only setting, not a normalisation one: the tool never rewrites a surviving line's case to match some standard form, it simply decides which lines count as equivalent for the purpose of finding repeats.
This matters for lists gathered from several sources with inconsistent capitalisation — email addresses submitted through different forms, product names typed by different people — where without this setting, "John@Example.com" and "john@example.com" would be treated as two distinct entries and both would survive, defeating the purpose of deduplicating in the first place.
Finding duplicates instead of removing them
Inverting the operation to show only the lines that appeared more than once turns this from a cleanup tool into an auditing one — useful when the goal is not a clean list but an answer to "does this list actually contain duplicates, and which ones." This is the more useful mode when investigating a data quality problem: a customer list suspected of containing repeat sign-ups, a keyword list that may have been assembled from overlapping sources, a log file where repeated lines might indicate a genuine error being logged repeatedly rather than once.
Trimming whitespace before comparing lines
Two lines that look visually identical can still fail to match as duplicates if one carries a trailing space or an extra tab character invisible to the eye — a common outcome of copying data out of a spreadsheet or a table, where cell padding sometimes carries over as literal whitespace. Trimming each line before comparison removes exactly this class of false non-duplicate, catching entries a human reviewer would immediately call the same but a strict character-for-character comparison would not.
Frequently asked questions
Which duplicate is kept?
The first occurrence, so the original order is preserved for everything that remains. If you also turn on sorting, the surviving lines are then ordered alphabetically.
What does "ignore case" actually do?
It treats Apple, APPLE and apple as the same line and keeps whichever appeared first — with its original capitalisation intact. It changes what counts as a duplicate, not how the output is written.
Can I find the duplicates instead of removing them?
Yes. "Show duplicates only" inverts the operation and lists just the lines that appeared more than once — useful for auditing a list rather than cleaning it.
Is there a size limit?
Practically, a few hundred thousand lines. Everything runs in your browser, so the limit is your device memory rather than an upload cap — and your data never leaves the tab, which matters for customer lists.
Common remove duplicate lines tasks
You might also need
Case Converter
Convert text between every capitalisation style
Word Counter
Count words, sentences and reading time as you type
CSV to JSON
Convert spreadsheet exports into JSON
Character Counter
Count characters against platform limits
Diff Checker
Compare two texts and highlight every difference
Lorem Ipsum Generator
Placeholder text in paragraphs, sentences or words