loot.tools

Duplicate Line Remover

Remove duplicate lines from text, keeping the first occurrence.

Remove duplicate lines from text. Keep the first of each line, or strip out anything that repeats.

Input
Output

About Duplicate Line Remover

Paste text and remove all duplicate lines instantly. Keep the first occurrence of each line, or strip out every line that repeats so only one-off lines remain. Toggle case sensitivity, whitespace trimming, and alphabetical sorting of the result.

What this tool does

Paste text with repeated lines and get back only the unique ones. The tool keeps the first occurrence of each line and throws away the rest. Original order stays the same. You can toggle case sensitivity and whitespace trimming to control what counts as a duplicate.

How to use it

Paste your text in the input area. Duplicates are removed instantly and the result appears below. Pick 'Keep first occurrence' to leave one copy of each line, or 'Keep only non-repeated lines' to drop every line that shows up more than once. Check 'Case sensitive' to treat 'Hello' and 'hello' as different lines. Check 'Trim whitespace' to ignore leading/trailing spaces when comparing, and 'Sort output' to return the result in alphabetical order. The stats show total lines, unique lines, and how many were removed.

Common use cases

  • Cleaning up log files with repeated entries
  • Deduplicating email lists or CSV rows
  • Removing repeated lines from data exports
  • Cleaning up command history
  • Preparing unique word lists from raw text