Strip repeated lines from a list while keeping the order.
Remove duplicate lines from any list. Comparison can ignore case and surrounding whitespace, and the lines that remain stay in their original order.
Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.
This is one of the thingsText Cleanerdoes — open it for everything else it supports.
Loading tool…
What Text Cleaner supports
Collapse extra spaces
Trim each line
Remove empty lines
Remove duplicate lines
Remove line breaks
Remove numbers
Remove punctuation
Remove non-ASCII characters
Strip HTML tags
Normalise smart quotes
About Remove Duplicate Lines
Merged lists collect duplicates: two exports combined, a keyword list assembled from several sources, log lines with the same entry repeated a hundred times. Finding the repeats by hand is impractical past a few dozen rows.
Every line is compared against the ones before it and only the unique entries are kept, in their original order. Whether two lines count as the same is under your control — matching can ignore case, so Alice@example.com and alice@example.com are treated as one, and it can trim surrounding whitespace so a stray trailing space does not make an identical line look different.
How to remove duplicate lines
1
Paste your list
One item per line. Any length is fine.
2
Set the matching rules
Decide whether to ignore case and trim whitespace before comparing.
3
Copy the cleaned list
The result appears with a count of how many lines were removed.
Frequently asked questions
Does this change the order of my list?
No. The remaining lines stay in their original relative order, and the first occurrence of each value is the one kept. Nothing is sorted unless you ask for it separately.
Are lines that differ only in capitalisation treated as duplicates?
Only if you enable case-insensitive matching. It is off by default because case is meaningful in some lists, such as file paths on case-sensitive systems, and exactly right for email addresses.
What happens to blank lines?
Blank lines are treated as ordinary lines, so repeated blanks are deduplicated like anything else. There is a separate option to remove all empty lines regardless of duplication.
Is my list uploaded anywhere?
No. Everything runs in your browser, which matters when the list is customer emails or anything else you should not paste into a server-side tool.