Skip to content
ToolsOnDuty
Text Tools

Duplicate Line Remover

Remove repeated lines, keeping the first or last, with optional case and space matching.

Free foreverRuns in your browserNo sign-up
Options

About the Duplicate Line Remover

This tool removes duplicate lines from a list or file, leaving one copy of each unique line.

You can keep either the first or the last occurrence of each repeated line, and choose whether to ignore letter case and leading or trailing spaces when comparing.

It is ideal for cleaning up email lists, log files, CSV columns and any text where the same line appears more than once.

Key features

  • Keep the first or last occurrence
  • Optional case-insensitive matching
  • Optional ignore of leading and trailing spaces
  • Shows how many lines were removed

How to use

  1. 1Paste your lines into the box.
  2. 2Choose whether to ignore case and surrounding spaces, and which copy to keep.
  3. 3Click Remove duplicates and copy the result.

Frequently asked questions

Does it change the order of lines?
No. The remaining lines stay in their original order. Only later duplicates are removed when keeping the first, or earlier duplicates when keeping the last.
What does ignoring case do?
With ignore case on, lines that differ only in capitalisation, such as Apple and apple, are treated as duplicates.
Is my text uploaded anywhere?
No. Everything runs in your browser, so your text never leaves your device.