Remove Duplicate Lines
Remove duplicate lines from any list online for free: keep the first or last copy, keep only lines that appear once, or list only the repeats, with ignore-case, trim, normalize spaces, remove empty lines and A to Z sorting, live stats and a removed-lines audit. 100% in your browser, no signup.
Deduplication options
Your clean list will appear here.
What counts as a duplicate?
Two lines count as the same line when their comparison keys match. Ignore case lowercases both lines before comparing, so Apple and APPLE are one line. Trim removes leading and trailing spaces, and Normalize spaces also collapses every run of spaces or tabs inside a line to a single space, so "New York" and "New York" match. The kept line always keeps its original casing: only the comparison is lowercased, never your text.
🔒 Privacy: deduplication runs locally in your browser. Nothing you paste is uploaded, stored or seen by anyone else.
More text tools
How this calculator works
A list with repeats is a small mess that grows fast: an email list pasted from a spreadsheet, a keyword list merged from three files, a log file with the same error a hundred times. Removing the repeats by hand means scanning every line and hoping you do not miss one. This tool does it in one paste: every line that appears more than once is reduced to a single copy, in the order you pasted it, and the count of removed lines is shown at the top. Paste a column copied from Excel or Google Sheets, a list of URLs, email addresses or names, and the clean list appears live as you type. Everything runs in your browser, so nothing you paste is uploaded or stored.
Four modes cover the ways people actually use a deduper. Keep first occurrence is the default and the one most lists need: the first copy of each line stays and every later copy goes. Keep last occurrence does the opposite and keeps the newest copy, which is what you want when a list was appended over time and the last entry is the fresh one. Only lines that appear once keeps exactly the lines with no twin anywhere, which is how you find the entries that exist in one list but not another after merging two lists. Only repeated lines does the reverse and shows one copy of each line that appears more than once, which is the fastest way to see what is duplicated before you decide what to delete. Case and whitespace options decide what counts as the same line: ignore case treats Apple and APPLE as one line, trim removes leading and trailing spaces, and normalize spaces collapses repeated spaces inside a line, so "New York" and "New York" match. Empty lines can be dropped, and the result can be sorted A to Z or Z to A instead of keeping the original order.
The removed-lines audit under the result lists every line that was taken out and how many copies of it were removed, so you can verify nothing important disappeared before you copy the clean list. Copy the result or download it as a .txt file ready to paste back into a spreadsheet or a text file. Use the Text Diff Checker when two versions of a list need comparing line by line, the Case Converter when the casing itself needs fixing first, and the Word Counter when you need a quick count of the words in the cleaned list.
