UtilDojo

Popular

Menu

Remove Duplicate Lines Online

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

Lines

Unique lines

Result appears here.

About this tool

Paste a list — emails, names, product codes, keywords — with one item per line and get back only the unique lines, in their original order. The header tells you how many were kept and how many removed. The data never leaves your browser: nothing is uploaded or saved.

To use it, paste your list into the Lines box (or press Sample) and the unique lines appear on the right as you type; Copy them or Download them as unique-lines.txt. Four settings decide what counts as a duplicate. “Trim spaces” (on by default) ignores spaces at either end of a line. “Ignore case” treats “Pune” and “pune” as the same line and keeps the spelling of the copy that survives. “Remove empty lines” drops blank lines; left off, blank lines stay put and are never treated as duplicates of each other. Keep first or Keep last chooses which copy survives.

For example, paste six lines: Mumbai, Delhi, Pune, Mumbai, Chennai, Delhi. With “Keep first” the output is Mumbai, Delhi, Pune, Chennai and the header reads “4 kept · 2 removed”. With “Keep last” the later copies survive, giving Pune, Mumbai, Chennai, Delhi. Either way each line appears once, in its original order.

Lines are compared whole, so “Delhi NCR” and “Delhi” are different, as are two lines that differ only by a double space in the middle. If the list came from a PDF or a web page, run it through Remove Extra Spaces first. If you also want the result sorted, Sort Lines has its own “Remove duplicates” option and does both in one step. Hundreds of thousands of lines are handled in a moment.

Frequently asked questions

Does it change the order of my list?

No. Lines stay in their original order; only the repeats are removed. Use the Sort Lines tool if you also want them sorted.

Can I remove duplicates from Excel?

Yes — copy a single column from Excel or Google Sheets, paste it here, and paste the result back. Each cell becomes one line.

Which copy is kept when lines differ only in case?

With “Ignore case” on they count as one line and the first spelling (or the last, with Keep last) is kept as written. With it off, “bengaluru” and “Bengaluru” both stay.

Why are two lines that look the same both kept?

They differ in something you cannot see — a double space, a tab or a non-breaking space from a web page. Trim spaces only handles the ends of a line, so clean the text with Remove Extra Spaces first.

Does it remove empty lines?

Yes, by default. Untick “Remove empty lines” to keep them; they are never counted as duplicates, so groups separated by blank lines keep their grouping.

Is there a size limit?

No fixed limit. Very large lists depend only on your device’s memory.

Related tools