Remove duplicate lines

Delete repeated lines and keep the order.

Remove duplicate lines

Keep

0 lines · 0 characters

0 lines · 0 characters

Results update as you type.

Runs in your browser. Nothing uploaded.

How to remove duplicate lines

  1. Paste your list into Input, one item per line.
  2. Choose what to keep: one of each line (the usual de-duplicate), only the lines that appear once, or only the lines that are repeated. Then choose whether case and surrounding spaces count as differences.
  3. Copy the de-duplicated list. The first occurrence of each line is kept, in its original position.

Common uses

  • Clean a mailing list before importing it, so nobody gets the same email twice.
  • Find the distinct values in a spreadsheet column.
  • Remove repeated entries from log files, keyword lists or exported IDs.

Tips for cleaning lists

  • Choose whether case counts. With Case-sensitive off, “Apple” and “apple” count as the same line, which is usually what you want for names and emails.
  • Spaces often hide duplicates. Ignore surrounding spaces is on by default, because a stray space at the end of a line makes two entries look different when they aren’t.
  • The first one wins. When a line appears more than once, the first copy stays where it was and later ones are removed, so the original order is kept.
  • Sort afterwards if you like. Removing duplicates doesn’t reorder the list; use a sorting tool next if you want it alphabetical.