Search tools

Remove Duplicate Lines

Remove repeated lines from a list, keeping the first of each.

Lists & Random

Clean

What counts as a duplicate

  • The first one stays: Items keep their order; of every repeated item the first stays and later repeats are removed.
  • Case on or off: With "Ignore case", "Apple" and "apple" count as the same item and the first spelling is kept.
  • Spaces and empty items: "Trim spaces around items" removes spaces at the start and end of every item, so the items change. "Remove empty items" drops blank lines.
  • Lines or separators: Items are lines by default; a list separated by commas, semicolons or tabs works the same.

Frequently asked questions

Does it change the order?

No. Items stay in their original order; only later repeats are removed. Sort the list afterwards if you want it ordered.

Which line breaks does the result use?

Plain line feeds (LF). Browsers convert every line break in a text field to this form, so Windows line breaks (CRLF) from your input are not kept. Current editors on Windows, macOS and Linux all read LF.

Can it remove repeated words in a sentence?

No. It works on whole items: lines, or values separated by commas, semicolons or tabs.