Remove Duplicate Lines

Remove repeated lines from a block of text, keeping only the first occurrence of each.

How to Use the Remove Duplicate Lines Tool

  1. Paste your text into the box, with one item per line.
  2. Choose whether comparison should be "Case Sensitive" and whether to "Trim Whitespace Before Comparing".
  3. Click "Remove Duplicates" to see the de-duplicated list and how many lines were removed.

Frequently Asked Questions

It compares each line's text to every line seen so far, and removes any line that repeats an earlier one, keeping only the first occurrence.

When enabled, 'Hello' and 'hello' are treated as different lines. When disabled, they're treated as duplicates regardless of capitalization.

When enabled, leading/trailing spaces are ignored when comparing lines, so ' Hello' and 'Hello' are treated as duplicates, though the original line is kept as-is in the output.

Yes, it's completely free and requires no sign-up.
No ratings yet — be the first!
Rate this calculator: