Free Online Remove Duplicate Lines, Keep First, Keep Last or Show Only Repeats
Take a list and leave one of each. Keep the first time a line appeared or the last, ignore case or spacing while comparing, and see how many copies each line had. You can also flip it around and keep only the lines that were repeated, which is how you find the duplicates rather than remove them.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
When Are Two Lines the Same Line
Every duplicate remover answers this. Most do not tell you how.
| These two lines | Same by default? | Which switch changes it |
|---|---|---|
| apple and Apple | No | Ignore upper and lower case |
| apple and apple | Yes | Ignore spaces at the ends, which is on by default |
| red apple and red apple | No | Ignore double spaces inside |
| A blank line and another blank line | Dropped | Drop blank lines, which is on by default |
Where Your Text Goes
Nowhere. And you can check that yourself.
How to Remove Duplicate Lines
Four steps, and your original text is never changed.
What to Know Before You Deduplicate
Including the things this tool cannot do.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the Remove Duplicate Lines
Lists collect duplicates. Two exports get merged, a form was submitted twice, a spreadsheet column was pasted on top of another one. Finding the repeats by eye works up to about twenty lines and then stops working entirely, and sorting first only helps if you also remember to look.
This removes them, and it also does the opposite job, which is asked for just as often: show me only the lines that repeated. A third mode puts a count in front of every line, tab separated, so pasting it into a spreadsheet gives you two proper columns and you can sort by frequency.
The part worth reading is which lines count as the same. Case and stray spaces are what usually turn one duplicate into two entries that survive, and an invisible carriage return from a Windows text file will defeat a tool that only splits on the newline. All three are handled here, and the switches are on the page rather than hidden in the code.
Frequently Asked Questions
Why duplicates survive, and how to find them instead of removing them.
Every Other Text Tool
24 more tools in this set. All free, all in your browser.