1 empty line was also removed.
How to use the Remove Duplicate Lines
- 1Paste your list into the box, with one item per line.
- 2Choose your options: ignore case, trim leading and trailing spaces, remove empty lines, or sort A→Z.
- 3Check the counts for duplicates removed, original lines and unique lines.
- 4Press Copy result to copy the cleaned list, or Clear to start again.
How duplicate lines are detected
The tool reads your text one line at a time and remembers every line it has already seen. When a line matches an earlier one, it is dropped; otherwise it is kept. Because the first occurrence always wins, the unique lines stay in the same order they appeared in your original list unless you turn on sorting.
By default two lines must match exactly to count as duplicates. The options change what exactly means. Ignore case treats Apple, apple and APPLE as the same line and keeps whichever version came first. Trim removes spaces and tabs at the start and end of each line, so an item copied with a trailing space no longer looks different from the same item without one. Remove empty lines drops blank and whitespace-only lines entirely instead of keeping a single empty line.
Example: cleaning a list
The sample list contains 11 lines: apple, Banana, cherry, apple, banana, an indented cherry, a blank line, date, Apple, item 10 and item 2. With the default options (trim and remove empty lines on), the second apple and the indented cherry are removed as duplicates and the blank line is dropped, leaving 8 unique lines. Banana, banana and Apple survive because their capitalisation differs.
Turn on Ignore case and the count of duplicates rises to 4, leaving 6 unique lines. Add Sort A→Z and the result reads apple, Banana, cherry, date, item 2, item 10. Notice that item 2 comes before item 10: the sort uses natural order, comparing numbers by value rather than character by character, and it ignores case so capitalised words are not pushed to the top.
Common uses
Removing duplicates is a quick way to clean up email lists, keyword lists, product SKUs, tags, file names or log entries before importing them somewhere else. If you need to standardise capitalisation first, run the list through the case converter and then remove duplicates here.
To see exactly which lines changed between the raw and cleaned versions, paste both into the text compare tool. Everything runs in your browser, so lists containing names or addresses are never uploaded to a server.
Frequently asked questions
Does removing duplicates change the order of my lines?
No. Unless you turn on Sort A→Z, the unique lines are kept in the order they first appear. Only the later repeats are removed.
Which version is kept when Ignore case is on?
The first one. If your list contains Paris and later paris, the output keeps Paris exactly as written and removes paris.
How does the natural sort work?
It compares text the way people read it: letters alphabetically without regard to case, and runs of digits by numeric value. That puts file 9 before file 10, which a plain character-by-character sort would get wrong.
Can I count how many items are in my list?
Yes. Original lines shows the total number of lines you pasted and Unique lines shows how many remain. For word and character counts of longer text, use the word counter.
Is there a limit on how many lines I can paste?
There is no fixed limit. The tool comfortably handles tens of thousands of lines, although very large inputs may take a moment depending on your device. More cleanup tools are listed on the text tools page.