Duplicate Line Remover
Paste text and remove repeated lines, keeping the first occurrence of each.
Last updated
How to remove duplicate lines
- Paste your list, one item per line.
- Choose whether case matters, whether to ignore spaces at the ends of lines, and whether to drop blank lines.
- Click Remove duplicates, then Copy result.
About this tool
Lines are compared as whole strings — the first time a line is seen it's kept, and every later line that matches it (under the options you've chosen) is dropped, preserving the original order of what remains. "Ignore leading/trailing whitespace" trims each line before comparing, so foo and foo count as the same line, but the version you kept still has its original spacing intact.
Nothing you paste here is sent to a server — the entire tool runs as JavaScript in your browser tab.
Questions about removing duplicates
Does it keep the original order?
Yes. The first time each line appears it’s kept where it was; only later repeats are removed.
Are “Apple” and “apple” treated as duplicates?
Only if you untick Case-sensitive comparison. With it ticked, they count as different lines.
How do I remove duplicates from an Excel or Google Sheets column?
Copy the column, paste it here, remove the duplicates and paste the result back. Each cell becomes one line.
Can I sort the list as well?
Yes, with the line sorter, which sorts A to Z, by length or by number.