Remove Duplicate Lines
Paste a list, one item per line, and get it back with every repeated line removed. Keep the first copy, keep only lines that never repeat, or list just the repeats.
How it works
The tool reads your text one line at a time and compares each line with the ones before it. Choose what to do with the matches and the result appears in the output box. Your input is never changed until you choose “Use output as input”, and nothing leaves your browser.
- Keep the first copy: the usual de-duplication. The first time a line appears it stays, and later copies are dropped. The original order is preserved.
- Keep the last copy: the same, but the final occurrence survives instead.
- Keep only lines that appear once: any line that is repeated anywhere is removed entirely, including its first copy.
- Show only the lines that repeat: lists each repeated line once, which is handy for finding what is duplicated in a list.
Ignore case treats “Apple” and “apple” as the same line, and ignore leading and trailing spaces treats “cherry” and “ cherry” as the same. The line that is kept is always printed exactly as you typed it.
Worked example
The sample list has 7 lines: apple, banana, Apple, cherry, banana, “ cherry” (with a leading space) and date. With spaces ignored and case respected, the second banana and the spaced cherry are duplicates, so the output is apple, banana, Apple, cherry, date (5 lines, 2 removed). Tick Ignore case as well and “Apple” goes too, leaving 4 lines.
Good to know
Lines are compared as whole strings, so two lines that differ by a single punctuation mark count as different. Duplicates are only found within the pasted text, not against any earlier list. Very large lists (hundreds of thousands of lines) work, but may take a moment on older phones.
Frequently asked
Does it keep the original order?
Yes. Lines stay in the order you pasted them. If you want them sorted afterwards, use the Line Sorter.
What counts as a duplicate?
Two lines that are exactly equal after the options you chose are applied. With Ignore case and Ignore spaces ticked, “Apple”, “apple” and “ APPLE ” all match.
Is my text uploaded?
No. The comparison runs entirely in your browser, so private lists such as email addresses never leave your device.
Last updated: October 2026