Skip to content
GAMETROZ

Remove Duplicate Lines

Delete repeated lines from a list and keep the first occurrence of each, in order.

Processed locally in your browser.

About Remove Duplicate Lines

Email lists, keyword exports, log files and to-do lists pick up repeated lines as they are merged. This tool keeps the first time each line appears and drops the rest, so the order you started with is preserved.

By default lines must match exactly. Turn on case-insensitive matching to treat Apple and apple as the same, or trimming to ignore stray spaces around a line. The kept line is always shown exactly as you wrote it.

How to use Remove Duplicate Lines

  1. 1Paste your list with one item per line.
  2. 2Set the options: case sensitivity, trimming before comparing, and whether to ignore empty lines.
  3. 3Check the summary to see how many lines were removed.
  4. 4Copy the cleaned list or clear the box.

Examples

Input

apple
Banana
apple
banana
Cherry

Result

apple
Banana
banana
Cherry
Case sensitive: only the exact repeat of apple is removed.

Input

apple
Banana
apple
banana
Cherry

Result

apple
Banana
Cherry
Case insensitive: banana counts as a repeat of Banana.

Frequently asked questions

What does ignore empty lines do?

Blank lines are left exactly where they are instead of being treated as duplicates of each other. That keeps the spacing of a list that has blank separator lines. To delete blank lines instead, use Remove Extra Spaces.

Is the order of my lines changed?

No. The first occurrence of each line stays in its original position. To sort the list as well, use the Text Sorter with its duplicate option.