Text utility

Remove Duplicate Lines

Paste text to keep each first-seen line in order. Choose how case, surrounding whitespace, and empty lines affect the result.

Remove duplicate lines

Comparison options

An empty line is a line whose trimmed text is empty. Empty lines removed here are not counted as duplicates removed.

Input lines
0
Output lines
0
Duplicates removed
0

Duplicates removed counts only lines skipped because an earlier line had the same comparison key. It does not include empty lines removed by the option.

How to remove duplicate lines

Process your text locally in three steps while keeping the first matching line in its original order.

  1. Paste or type text into the input area. Each textarea line is checked separately.
  2. Choose whether comparison is case sensitive, ignores surrounding whitespace, or removes trimmed-empty lines.
  3. Select Remove duplicates, review the counts and output, then copy the current result when ready.

Frequently asked questions

Which duplicate line is kept?
The first raw line for each comparison key is kept, and kept lines remain in their original first-seen order. Later matching lines are removed.
How do the comparison options work?
Case sensitive is on by default. When it is off, comparison uses JavaScript toLowerCase(). Ignore surrounding whitespace compares trimmed lines but keeps the first raw line unchanged. Remove empty lines excludes lines whose trimmed text is empty.
What does Duplicates removed count?
It counts only non-empty-filtered lines skipped because the same comparison key appeared earlier. Lines removed by Remove empty lines are excluded from that count.

Count your processed text or convert its ASCII letter case for the next step in your workflow.