Skip to content
Devtools 360

Remove Duplicate Lines from a List

Paste a list with one item per line and get back only unique entries, in their original order. Options control whether "Apple" and "apple" count as the same line and whether stray spaces are ignored.

Runs in your browserFree · No sign-up

How to remove duplicate lines

  1. Paste your list into the left box, one item per line.
  2. Choose whether the comparison is case-sensitive and whether spaces are trimmed before comparing.
  3. Decide whether to keep the first or the last occurrence, and how empty lines are handled.
  4. Copy or download the unique lines and check the counts of lines kept and removed.

First or last occurrence?

Keeping the first occurrence preserves the order in which items first appeared, which suits most lists. Keeping the last occurrence is useful for logs or exports where a later line is the newest version of a record. Either way the remaining lines stay in their original relative order — nothing is sorted. If you also want the result sorted alphabetically or naturally, pass it through the Text Sorter afterwards.

Benefits

  • Original order is preserved, unlike spreadsheet tricks that sort the data first.
  • Shows which lines repeated most and how many times.
  • Handles tens of thousands of lines instantly in the browser.

Limitations

  • Lines are compared exactly (after the optional trim and case folding); near-duplicates with typos are not detected.
  • Only whole lines are compared — duplicate values inside one line, such as comma-separated items, are not split out.

Privacy and security

Deduplication runs locally in your browser. Lists of emails, customer IDs or keywords never leave your device.

Read our privacy policy for details about the site as a whole.

Frequently asked questions

Does removing duplicates change the order of my lines?

No. Unique lines stay in the order they appeared. Only the repeated copies are removed.

How are empty lines handled?

By default empty lines are kept where they are and not treated as duplicates, so paragraph spacing survives. You can instead remove all empty lines with one checkbox.

Will " apple" and "apple" be treated as the same line?

Yes, while "Trim spaces before comparing" is on. The kept line is output exactly as it appeared in your input.