Duplicate Line Remover
Strip repeated lines from a list and keep only the unique ones. Or turn it around and see only the lines that repeat.
Your list
Result
Private by design. This page has no backend. Your list is cleaned by JavaScript running on your own device and is never sent anywhere.
The four things you can keep
Keep the first copy
The usual one. Every line survives once, at the position where it first appeared, and every later repeat is dropped. Order is otherwise untouched.
Keep the last copy
Same result, different position: each line appears once, at the place its final copy sat. Useful when a list has been appended to over time and the newest entry for a thing is the one you want.
Only lines that appear once
Stricter. A line that appears twice is removed entirely rather than reduced to one copy, so you are left with the genuinely singular entries. Good for spotting the odd one out in two lists pasted together.
Only the duplicates
The inverse view: one copy of each line that appeared more than once, and nothing else. This is how you find out what was repeated rather than removing it.
How lines are compared
Trim spaces is on by default and matters more than it looks: without
it, apple and apple with a trailing space are two
different lines, which is the single most common reason a duplicate remover appears not
to work. Drop blank lines removes empty lines rather than keeping one
of them. Case sensitive is off by default, so Apple and
apple are the same line and the first spelling encountered is the one
kept. Sort the result A to Z alphabetises the output using your
browser's language rules; leave it off and the original order is preserved.
The counts
Lines in is every line you pasted, before any option is applied. Lines out is what came back. Repeated is how many distinct lines had more than one copy — not how many copies were thrown away, which is the difference between the first two numbers.
Common uses
Cleaning a mailing list, merging two lists and finding what they share, deduplicating tags or keywords, and tidying a column pasted out of a spreadsheet.
How to use the Duplicate Line Remover
- Paste your list, one item per line.
- Choose to keep the first or last copy, or to show only unique or only duplicate lines.
- Optionally trim lines, ignore case or drop blank lines, then copy the result.
Frequently asked questions
Can it keep only the duplicates instead of removing them?
Yes. Switch the mode to show only duplicated lines, or only the unique ones.
Is the comparison case-sensitive?
By default it is not; you can enable case-sensitive matching so 'Apple' and 'apple' count as different.
Do blank lines count as duplicates?
Blank lines can be dropped automatically with the 'ignore blank lines' option.