Remove Duplicate Lines

Keep the first copy of each line, in order. Your text never leaves your browser.

How to remove duplicate lines

  1. Copy a column from Excel or Google Sheets, a list from a document, or addresses from your mail client.
  2. Paste it above. Each line is one item.
  3. Copy the result back. Pasting into a spreadsheet puts one line per cell.

Typical uses

How this tool calculates

Worked example

Take four lines: "a", "A", " a" (one space in front) and "b". With both ignore options on, only "a" and "b" remain and 2 lines are removed. With "ignore case" off, "A" stays as a separate line. These values come from running this tool's own functions.

Things to know before you use it

The full counting rules and the sources for service limits are on Methods and standards.

Frequently asked questions

Does removing duplicates change the order of my list?

No. The first occurrence of each line stays where it was and later copies are removed, so the original order is preserved. Use Sort Lines afterwards if you want it alphabetized.

How do I treat "Apple" and "apple " as the same line?

Tick "Ignore leading/trailing spaces" and "Ignore case". The first version of the line is kept exactly as you typed it.

Is there a size limit?

Everything runs in your browser, so tens of thousands of lines are handled instantly on a normal laptop or phone. Nothing is uploaded.

More text tools