Remove Duplicate Lines
Remove duplicate lines from text lists, lists of URLs, or email rosters while preserving original order or sorting alphabetically.
Embed this Tool on Your Website
Copy this code snippet to add the Remove Duplicate Lines to your blog or website for free. It adjusts dynamically to mobile and desktop screens.
How to Use Remove Duplicate Lines
Remove Duplicate Lines Formula / How It Works
The tool splits the text input into an array of lines, passes the array through a unique JavaScript Set object, and recombines the lines.
For example, let's look at a list containing: "apple", "banana", "apple", "orange", "banana" on separate lines. By entering these values into the tool, you will get a deduplicated list containing "apple", "banana", "orange" and a report of 2 removed duplicates instantly.
Frequently Asked Questions
Yes, lines must match exactly. "item" and "Item" are treated as distinct.
You can toggle whether to strip or keep empty whitespace lines.
By default, it maintains original order, but you can sort them if desired.
The process of filtering out repeating items to leave only unique values.
The browser can easily process thousands of lines of text.
More tools available in our full calculator directory.