Remove duplicate lines
Paste a list to remove repeated lines and blank lines, keep the first copy of each, and optionally sort the result.
Cleaned up in your browser. Your text is never sent or stored.
Paste a list above to see how many lines repeat.
Repeated lines
Lines that appear more than once are listed here, with how many times they appear.
How it works
Clean lists in one step
Each line is compared with the lines before it. The first time a line appears it is kept; every repeat is dropped. With the options you decide what counts as the same line, and whether to sort what is left.
Handy for
- Email lists and contact exports with people listed twice.
- Keyword lists, tags and product codes.
- Log files and copied spreadsheet columns.
- Merging two lists: paste both, then remove the duplicates.
Counting entries instead? The word counter also counts lines and paragraphs.
More tools
More text tools
- Word counterWords, sentences, paragraphs, reading time and keyword density.
- Character counterCharacters with and without spaces, checked against limits for posts, bios, ads and SMS.
- Reading time calculatorWords to minutes: how long your text takes to read or say out loud.
- Case converterUPPERCASE, lowercase, Title Case, Sentence case, camelCase and more.
- Remove line breaksJoin lines into paragraphs or a comma-separated list, and remove extra spaces.
Frequently asked questions
Which copy of a duplicate line is kept?
The first one. All later copies are removed, and the remaining lines keep their original order unless you choose to sort them.
Are "Apple" and "apple" duplicates?
Only with "Ignore case" on. By default, lines must match exactly. "Trim spaces" also treats lines as equal when they only differ in spaces at the start or end.
Can I see which lines were duplicates?
Yes. Open "Repeated lines" below the result to see every line that appeared more than once and how many times it appeared, most repeated first.
How do I remove blank lines?
"Remove blank lines" is on by default. It drops empty lines and lines with only spaces or tabs, wherever they are in the list. Turn it off to keep the first blank line and remove only the repeats.
How does sorting handle numbers?
It sorts naturally, the way people expect: item 2 comes before item 10, instead of the strict character order that puts item 10 first.
Is there a limit to the number of lines?
No fixed limit. Lists of many thousands of lines are handled instantly, in your browser, without uploading anything.