Text tool

Duplicate Line Remover

Keep one copy of each item in a line-by-line list, preserving the first occurrence’s spelling and order.

Line-edge whitespace and blank lines are always removed. The optional setting is case sensitivity.

6 lines

Should Apple and apple count as the same item?

  • Ignore capitalization

    Leave Case-sensitive off to treat Apple and apple as duplicates. The first occurrence’s capitalization is preserved.

  • Keep case differences

    Turn Case-sensitive on to keep both forms. Use this when capitalization distinguishes identifiers or other values.

  • Review the retained order

    Run Remove duplicates and check the remaining list and removal count. Items stay in first-seen order; they are not alphabetically sorted.

A list with mixed capitalization

Start with
Apple / apple / Banana / APPLE, one item per line
Check the result
With case sensitivity off, Apple and Banana remain. With it on, all four lines remain.

Both modes trim line edges first. Blank lines are excluded before the duplicate count is calculated.