Text & Writing Tools
Remove Duplicate Lines
Remove repeated lines while preserving the order of the first occurrence.
Your input is processed in this browser and is not sent to our server.
How to Use Duplicate Lines
- Paste text with one item per line.
- Select Run tool.
- Copy the output, which keeps the first occurrence of each exact line.
Example
Input
red\nblue\nred
Result
red\nblueCommon Errors & Troubleshooting
- Matching is exact and case-sensitive; “Blue” and “blue” are distinct lines.
- Whitespace differences make lines distinct; trim the input first if that is not intended.
Frequently Asked Questions
Does the tool keep the first duplicate or the last?
It keeps the first occurrence and preserves the original order of retained lines.
Are lines compared without regard to case?
No. The comparison is case-sensitive and does not normalize whitespace.