Remove Duplicate Lines
Clean up repeated lines.
Input
0 lines
Result
Each repeated line stays where it first appears.
Remove duplicate lines online
Paste a list and get back only the lines you want. Remove repeats, keep the first or last copy, or find the lines that appear more than once.
- Four ways to clean a list. Keep the first of each line, keep the last of each line, keep only the lines that appear once, or show only the lines that repeat.
- Ignore case. Treat Apple and apple as the same line so capital letters do not hide a duplicate.
- Trim spaces. Remove spaces at the start and end of each line, so "apple" and "apple " match.
- Remove blank lines. Drop empty lines from the result at the same time.
- See what repeated. A list shows the lines that appeared most often and how many times, and the totals show how many lines were kept and removed.
- Order is kept. Lines stay in the order they came in. Use the Text Sorter when you also want them alphabetical.
- Copy, download or keep going. Copy the result, save it as a .txt file, or use it as the new input to try a different setting.
- Private by design. Your list is cleaned in your browser. It is never sent to a server or stored.
Uses of a duplicate line remover
- Email and contact lists. Remove repeated addresses before importing a list or sending a campaign.
- Keywords and tags. Clean up a keyword list gathered from several tools so each term appears once.
- Spreadsheet columns. Copy a column from a spreadsheet, remove repeats and paste it back.
- Log files and data exports. Cut repeated entries down to the distinct ones, or find the lines that repeat the most.
- Code and configuration. Remove repeated imports, URLs, IDs or settings from a long list.
- Finding what is repeated. Switch to Only repeated lines to see exactly which entries have duplicates.
Remove duplicate lines questions
How do I remove duplicate lines?
Paste your list into the Input box with one item on each line. The Result box shows the list with repeats removed. Copy it or download it as a text file.
Which copy of a repeated line is kept?
By default the first one, and the lines stay in their original order. Choose Keep last of each to keep the last copy instead.
What does Only lines that appear once do?
It removes every line that has a repeat, including the first copy. What is left are the lines that were never repeated. This is handy for finding what is unique to a list.
How do I find which lines are duplicated?
Choose Only repeated lines. The result lists each repeated line once. The Most repeated lines panel under the boxes also shows how many times each one appeared.
Are uppercase and lowercase treated as different?
By default, yes: Apple and apple are different lines. Turn on Ignore case to treat them as the same. The first version found is the one kept.
Why are some duplicates not removed?
Usually because of invisible differences, most often extra spaces at the start or end of a line. Turn on Trim spaces and try again.
What happens to blank lines?
Blank lines are treated like any other line, so several blank lines collapse into one. Turn on Remove blank lines to drop them completely.
Can I remove duplicates from a large file?
You can open plain text files such as .txt, .csv and .log with Open file, up to 5 MB. Lists with many thousands of lines are handled in your browser.
Does it work on a phone or tablet?
Yes. The layout adapts to any screen and works with touch.
Is my list saved or uploaded?
No. Everything happens in your browser on your own device. Your list is never sent to a server, and it is gone when you close or refresh the page.