Duplicate Line Remover
Lists copied from spreadsheets, logs or email threads tend to acquire the same entry twice. This tool keeps the first occurrence of each line and drops later matches, so the items that survive stay in their original order.
How to Use
- Paste your list into the upper box, one item per line. The result updates as you type.
- Tick Ignore case if 'Apple' and 'apple' should count as the same item.
- Tick Trim whitespace before comparing if lines may carry stray leading or trailing spaces.
- Read the count line to see how many unique lines remain, then copy the result.
Practical Examples
- A guest list of Alice, Bob, Alice, Carol becomes Alice, Bob, Carol — the second Alice is dropped and Bob stays ahead of Carol.
- An inventory export with 'Widget-A' and 'widget-a' collapses to one line when Ignore case is enabled.
- A tag list with 'design ' and 'design' becomes a single 'design' once Trim whitespace is enabled.
Understanding the Result
A line is treated as a duplicate when its comparison key has already been seen. The key is the line itself, optionally lowercased and optionally trimmed depending on the two checkboxes. Only the first line with a given key is kept.
The list is read from top to bottom, so the surviving lines keep their original order — this is not a sort or an alphabetical deduplication. The count below shows how many unique lines were kept and how many lines were read in total, including blank ones.
Limitations and Useful Notes
- Blank lines are removed by default. Untick Remove empty lines to keep them; a line containing only spaces is treated as empty when Trim whitespace is enabled. Original order is always preserved.
- Matching is exact text (or case-insensitive text); it does not fuzzy-match near-duplicates such as 'Bob Smith' and 'Bob Smith' with different internal spacing.
- The options only affect comparison. The tool does not sort, number or otherwise reformat your list.
- There is no server-side size limit, but very large lists depend on your browser's available memory.
Common Questions
Does it keep the first or the last duplicate?
The first. The tool walks the list top to bottom and keeps the earliest line for each key, which also preserves the order of everything that survives.
Is the output sorted alphabetically?
No. Sorting would change the order of your list, so the tool deliberately leaves it alone. If you need an alphabetical list, sort it separately afterwards.
Why did my blank lines disappear?
Remove empty lines is on by default so the result does not accumulate gaps. Untick it to keep blank lines. Lines with only whitespace count as empty too when Trim whitespace is on.