Remove duplicate lines
Clean up a list by removing every repeated line.
Runs in your browser. Nothing you type is sent anywhere.
- Ignore case or extra whitespace
- Keep the first or last copy
- Shows how many were removed
How to remove duplicate lines
- Paste a list with one item per line.
- Turn on case insensitive or ignore whitespace if needed.
- Copy the cleaned list, with the removed count shown above it.
Case and whitespace options together
| Settings | "Apple" vs "apple" | "apple" vs "apple " (extra space) |
|---|---|---|
| Both off | Kept as 2 lines | Kept as 2 lines |
| Case insensitive only | Treated as 1 duplicate | Kept as 2 lines |
| Ignore whitespace only | Kept as 2 lines | Treated as 1 duplicate |
| Both on | Treated as 1 duplicate | Treated as 1 duplicate |
Keep first vs keep last
When two lines count as duplicates, one copy has to survive. Keep first keeps the earliest occurrence in its original position, which usually makes sense for a list you built by hand. Keep last is useful for an exported log or a spreadsheet where a later row corrected an earlier one and you want the newest version to win.
Remove duplicate lines FAQ
Does it keep the original order of the list?
Yes. Lines stay in their original order, with only later or earlier duplicates removed depending on whether you choose to keep the first or last copy.
What does case insensitive mean here?
With it on, "Apple" and "apple" count as the same line. With it off, they are treated as different lines and both are kept.
What does ignore whitespace do?
It treats lines as the same if they only differ by leading, trailing or repeated spaces, which is useful for lists pasted from spreadsheets or PDFs.
Does the order of the kept lines ever change?
No. Every line that survives stays in its original position in the list. Only the duplicate copies are taken out.
Can I see exactly how many lines were removed?
Yes, a count appears above the result showing how many duplicate lines were removed.
Will repeated blank lines get removed too?
Yes. Several blank lines in a row count as duplicates of each other, the same as any repeated text line, and are reduced to one.
Can I remove duplicates from a very long list, like thousands of rows?
Yes, there's no fixed limit. A very large list takes slightly longer to process since every line is compared against every other line that's already been seen.
Does it work on data pasted straight from a spreadsheet?
Yes, paste a column of values with one entry per line, and use ignore whitespace if the spreadsheet added trailing spaces when it was exported.