Remove Duplicate Lines
Remove duplicate lines from lists and text. Keep the first or last occurrence, ignore case and trim whitespace. Copy or download the result.
How to use
- 1
Paste your list - one item per line.
- 2
Set the case-sensitivity and trimming options.
- 3
Click "Remove duplicates" and copy or download the result.
How it works
Each line is normalized - optionally trimmed and lowercased - then tracked in a set. Duplicate keys are dropped while you keep either the first or the last occurrence, depending on the chosen mode.
Frequently asked questions
Does it preserve the original order?
Yes, by default the first-occurrence order is kept. Toggle "keep last" if you want the final instance instead.
What counts as a line?
Each line break separates lines. Blank lines are left untouched unless you trim.
Related tools
Word Counter
Count words, characters, sentences, paragraphs and reading time instantly as you type. Free, private and fully browser-based.
Text ToolsCase Converter
Convert text between uppercase, lowercase, Title Case, sentence case, camelCase, PascalCase, snake_case and kebab-case instantly.
Text ToolsCharacter Counter
Count characters, characters without spaces, words and lines as you type. Handy for tweet, bio and form limits - fully offline and free.
Text ToolsJSON Formatter
Format, minify and validate JSON instantly. Clear syntax error messages with position, one-click copy and download in your browser.
Developer Tools