Remove Duplicate Lines
Runs in your browserStrip duplicate lines from a list while keeping the order you choose.
Input
Result
What is a Remove Duplicate Lines?
A duplicate line remover is useful for exactly the kind of line-based data that piles up messily in real work: repeated lines in a block of text, a list merged from two sources, URLs pulled from a crawl or backlink report, email addresses collected from more than one signup form, keyword lists exported from research tools, a single column copied from a spreadsheet, or log lines that repeat on every retry. This tool compares each line against the others using the settings you choose, keeps one copy of every distinct line, and discards the rest — the surviving lines stay in their original order unless you turn sorting on. Everything runs in your browser; nothing you paste is sent anywhere.
Two settings control what counts as a duplicate. Case-sensitive comparison, on by default, treats "Apple" and "apple" as different lines — turn it off if you want matches regardless of letter case, which is often what you want for URLs, emails, or tags. Trim whitespace, also on by default, ignores leading and trailing spaces when comparing, so a line with an invisible trailing space still matches its otherwise-identical twin instead of surviving as a false "unique" line.
Two more settings control what the output looks like rather than what counts as a match. Keep last occurrence keeps the text of the most recent duplicate instead of the first one found, useful when a later entry in your list is the more up-to-date version — the line still appears where the first occurrence was, only its content changes. Sort alphabetically re-orders the final, deduplicated list; leave it off to preserve your original ordering.
Where can I use a duplicate line remover?
| Use case | Why deduplicate it |
|---|---|
| URL lists | Crawl exports, backlink reports, and scraped link lists often repeat the same URL. |
| Email lists | Contact exports pulled from more than one signup form or system commonly repeat an address. |
| Keyword lists | Keyword research tools frequently export overlapping terms across reports. |
| Spreadsheet columns | Copy a single column from a spreadsheet — each cell becomes its own line — to spot repeated entries. |
| Logs | Repeated log lines from retries or polling can be collapsed down to the distinct events. |
| General text lists | Tags, IDs, or names where re-pasting or merging two files introduced repeats. |
How to use it
- Paste your list, one item per line.
- Toggle case-sensitive comparison and whitespace trimming to match what should count as a duplicate.
- Choose whether to keep the first or last occurrence of each duplicate.
- Optionally sort the result alphabetically.
- Copy the deduplicated list — the count of lines removed is shown above the result.
Examples
Default settings
apple
banana
Apple
apple
cherryapple
banana
Apple
cherryWith case-insensitive matching
apple
banana
Apple
apple
cherryapple
banana
cherry