Home › Text Tools

Remove Duplicate Lines

Delete repeated lines from a list and keep one copy of each, with optional sorting.

How it works

Paste one item per line. The first copy of each line is kept and later copies are removed. Spaces at the start and end of a line are ignored, but upper and lower case count as different.

Example

Your text: apple banana apple cherry banana · Order: Keep original order → Result: apple banana cherry

Formula

keeps the first copy of each line

Source

Counted directly from the text you enter; nothing is sent anywhere.

Checked: 2026-11-19 · Results are for information only.

Good to know

  • The lines stay in their original order. Nothing is sorted, and the first time a line appears is the copy that is kept.
  • “Apple” and “apple” count as different lines. To treat them as the same, change the list to lower case with the Case Converter first.

Questions and answers

Is “Apple” the same as “apple”?

No. Upper and lower case count as different lines.

What happens to empty lines?

Empty lines are removed.

Related calculators