Remove Duplicate Lines

Paste a list with one item on each line. Choose what counts as the same line and which copy to keep, and you get the cleaned list with a count of what was removed.

Free Runs in your browser Checked Tuesday, November 10, 2026

One item on each line. You can paste a spreadsheet column or the lines of a text file.

Apple and apple then count as the same line.

Spaces around each line are removed from the result too.

Lines that hold only spaces count as empty.

Keep

Result

Duplicate lines removed —
Lines before —
Lines after —
Cleaned list

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Paste the list in Lines, with one item on each line.
  2. Choose the options you need: Ignore upper and lower case, Ignore spaces at the start and end and Remove empty lines.
  3. Under Keep, choose whether the first or the last copy of a line stays.
  4. Copy the Cleaned list, or save it with Download.

How a duplicate is found

Each line is compared with the lines before it. A line is a duplicate when its text is the same as an earlier line. With the options switched on, the spaces at the ends are removed first and then the letter case is folded, so Apple and apple are the same line.

The copy that is kept stays in its place in the list, so the other lines keep their order.

  • With Keep: The last copy, a line stays where it appears for the last time.
  • Empty lines count as duplicates of each other unless you remove them.

Case and the language of the page

Letter case is compared with the rules of the page's language. On the Turkish page the capital I becomes dotless ı and the dotted İ becomes i, so Işık and ışık are the same line there. On the English page they are different lines, because the English rule for I is i.

What the tool does not do

  • It does not sort the list. Use the sort lines tool for that.
  • Lines that differ by a single character are different lines.
  • It does not touch a word that appears twice inside one line.

Worked example: a list of fruit

The sample list has eight lines: Apple, apple, Banana, an empty line, Cherry with two spaces at the end, Banana, another empty line and Date.

With the options switched on, the result is four lines: Apple, Banana, Cherry and Date. The tool reports 8 lines before, 4 after and 4 removed.

Step Lines
Before 8
After 4
Removed 4

Frequently asked questions

Does the tool sort the list?

No. The lines keep their order. To sort them alphabetically, numerically or by length, use the sort lines tool, which can also remove duplicates.

Which copy does the tool keep, and does the order change?

By default it keeps the first copy of each line, where it first appears. Choose the last copy when the newest entry should stay. Either way each kept line stays in its own place, so the rest of the list keeps its order.

Does letter case matter for Turkish letters?

Yes. On the Turkish page the capital I becomes dotless ı and İ becomes i when case is ignored, so Işık and ışık match. On the English page they are different lines, which is the usual English rule.

What counts as an empty line?

A line with nothing on it, or with only spaces and tabs, is empty. With Remove empty lines switched on, all of them are removed. With it switched off, each empty line counts as a duplicate, so only the first is kept.

Does my list leave my device?

No. The duplicates are removed in your browser. The list is not sent to our server, and the page does not store it.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.