Remove duplicate lines
Clean up email lists, keywords or log output. The first occurrence of each line is kept and later repeats are removed.
Runs in your browser. Nothing is uploaded.
Loading tool…
How to use
- Paste your list, one item per line.
- Tick Ignore case or Trim whitespace if you need them.
- Copy or download the cleaned list.
Common uses
- Clean a mailing list exported from several sources before importing it.
- Remove repeated keywords, hashtags or product codes from a list.
- Tidy log output so each message appears once.
Example
- Input
- apple Banana apple banana cherry
- Result
- apple Banana banana cherry
With “Ignore case” ticked, banana is also removed because Banana came first.
Good to know
- Order kept: nothing is sorted.
- Ignore case: “Apple” and “apple” count as the same; the first one is kept.
- Trim whitespace: spaces at the start and end of each line are removed before comparing.
- Text stays in your browser tab and is not saved.
Questions
Does it handle Windows line endings?
Yes. CRLF, LF and CR line breaks are all recognised; output uses LF.
Can I keep the last copy instead of the first?
Not directly. Reverse the list in a spreadsheet, remove duplicates here, then reverse it back.
Can it remove empty lines too?
Yes. Tick “Remove empty lines” to drop blank lines as well as duplicates. Leave it unticked to keep the first blank line, which some files use as separators.
Does Trim whitespace change my output?
Yes. When it is ticked, spaces at the start and end of each line are removed in the result as well as ignored when comparing.
How large a list can it handle?
Up to 5 million characters, which is hundreds of thousands of typical lines. Comparison uses fast lookups, so the result appears almost instantly on a computer.
Does it sort the list?
No. Lines keep their original order; only later repeats are removed.
How do I see how many were removed?
The count appears above the result as soon as you paste the list.