Remove Duplicate Lines

Remove repeated entries while keeping their first occurrence and order.

Paste one item per line, choose whether case or edge spaces should matter, then remove duplicates. Review the retained items before copying.

How to use

Remove repeated items from a list

Remove repeated entries while keeping their first occurrence and order.

Step by step

  1. Provide the source using: Your list.
  2. Set: Ignore letter case / Ignore leading and trailing spaces when comparing / Remove blank lines. Use the reference below to choose the options that fit your task.
  3. Choose: Remove duplicates. Inspect the result before copying, downloading or using it elsewhere.
  4. Paste one item per line, choose whether case or edge spaces should matter, then remove duplicates. Review the retained items before copying.

Choosing the settings

OptionWhat changes
Ignore letter caseBy default, lines must match exactly. Apple and apple are different, as are lines with extra spaces. Turn on the matching options only when you want those differences ignored. Up to 100,000 characters are processed locally.
Ignore leading and trailing spaces when comparingThe first occurrence stays in its original position and keeps its original spelling and spaces. Options change how lines are compared, not the text of retained lines. Windows and Mac line endings become standard newlines. A trailing newline counts as a blank final line.

Example and expected result

With Apple, apple and Apple on separate lines, default matching keeps Apple and apple. Ignoring letter case keeps only the first Apple. It does not sort the list or merge similar spellings.

If it is not working

  • If the result is unexpected, compare the original input and matching rules first. Keep an original copy, change one rule at a time and run again. Similar-looking text may differ in spacing, case or Unicode characters.

What stays unchanged?

The first occurrence stays in its original position and keeps its original spelling and spaces. Options change how lines are compared, not the text of retained lines. Windows and Mac line endings become standard newlines. A trailing newline counts as a blank final line.

What counts as a duplicate?

By default, lines must match exactly. Apple and apple are different, as are lines with extra spaces. Turn on the matching options only when you want those differences ignored. Up to 100,000 characters are processed locally.