How to use Remove Duplicate Lines
- Paste your list into the input box, one item per line.
- Choose the options you need - ignore case, trim spaces, remove empty lines.
- Read the result, where each line appears only once, and check the count of removed lines.
- Copy the cleaned list to use in your spreadsheet, script or email tool.
Features
- Keeps the first occurrence of each line and preserves the original order
- Ignore case option, so "Apple" and "apple" count as the same line
- Trim spaces option, so a stray leading or trailing space does not hide a duplicate
- Remove empty lines option to tidy gaps in a list
- Shows how many lines were removed
- Works with emails, URLs, keywords, IDs and any line-based data
- Handles long lists, up to about 5 million characters
- No daily limit
Supported formats and limits
- Maximum input: 5,000,000 characters
Examples
| Input | Result |
|---|---|
| apple / banana / apple / cherry / banana | apple / banana / cherry (2 lines removed) — The first occurrence of each line is kept, in the original order. |
| Apple / apple / APPLE | With ignore case on: Apple (2 lines removed). With it off: all three lines stay. |
| " apple" / "apple" | With trim spaces on: one line (1 removed). Without it: both stay. |
| a / (empty) / b / (empty) / a | With remove empty lines on: a / b (1 duplicate removed, plus the empty lines) |
Limitations
- Lines are compared as exact text. Two lines that look alike but contain different invisible characters, such as a trailing tab, count as different unless "trim spaces" is on.
- Only whole lines are compared. The tool does not find repeated words inside a line.
- It keeps the first occurrence only, so it cannot sort or choose which copy to keep.
- Text is limited to about 5 million characters.
Learn more
Duplicate lines creep into lists whenever data is merged: exported email addresses, keyword lists from several tools, log files, product codes or URLs collected from different pages. Removing them is a simple idea, but the details decide whether the result is trustworthy.
This tool uses a first-occurrence rule. It reads your lines from top to bottom, remembers each one it has seen, and drops any later line that matches. That keeps the original order, which matters when the order carries meaning such as priority or chronology. A sorted-unique approach, like the Unix sort -u command, would change the order.
Comparison settings change what "duplicate" means. Case-sensitive matching treats "Paris" and "paris" as different, which is right for passwords or code but not for names or email addresses, where ignore case is usually better. Trimming spaces helps with data copied from spreadsheets, where invisible padding is common. Removing empty lines is separate, because blank lines are a common source of accidental repeats in pasted text.
Frequently asked questions
How do I remove duplicate lines from a text?
Paste the text with one item per line. The tool returns the list with repeats removed and shows how many lines it took out.
Does it keep the original order?
Yes. It keeps the first occurrence of each line and leaves the rest of the order unchanged.
How can I remove duplicate lines in Excel or Google Sheets?
Copy the column, paste it here and copy the result back. For quick one-off cleaning of a single column this is faster than setting up a formula.
Can it ignore uppercase and lowercase differences?
Yes, turn on "ignore case". The first version that appears is the one kept.
Why are two identical-looking lines not removed?
They probably differ by an invisible character or a trailing space. Turn on "trim spaces" and try again.
Is my list uploaded?
No, everything runs in your browser, so email lists and other private data stay on your device.
Sources
Last reviewed: September 29, 2026