Remove Duplicate Lines
Remove duplicate lines from any list or text block while preserving original order. Optionally trim whitespace and ignore case before deduplication. Results update instantly.
0 duplicates removed
How to use the remove duplicate lines
Paste a list. Duplicates after the first occurrence are removed; original order is preserved.
Formula & explanation
Maintains a Set of seen keys; first occurrence wins. Optional trim and case-insensitive matching.
Examples
Removing duplicates from a list of email addresses, log entries, or config keys.
Frequently asked questions
- Does removing duplicates change the order of the remaining lines?
- No. The original order is preserved — only the second and subsequent occurrences of a duplicate are removed, keeping the first one in place.
- What does the 'Trim whitespace' option do?
- It strips leading and trailing spaces from each line before comparing, so ' apple' and 'apple ' are treated as the same entry even though they look different.
- Can I remove duplicates case-insensitively?
- Yes. Uncheck Case sensitive and entries like 'Apple', 'apple', and 'APPLE' will all be treated as the same value.
- How do I remove duplicate words (not lines)?
- Put each word on its own line first — for example by replacing spaces with newlines in a text editor — then paste the result here.
Related text & string tools
- Sort Lines / Sort List OnlineSort a list of words, names, or numbers — alphabetically A→Z or Z→A, numerically, or randomly. Paste any list and get sorted results instantly.
- Text DiffSide-by-side diff comparison of two text blocks with line-by-line highlighting. Shows added, removed, and changed lines — useful for comparing document versions or config files.
- Word & Text CounterCount words, characters, lines, sentences, and reading time instantly. Paste any text — article, essay, or code — and get a live breakdown. Also shows unique word count and average word length.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case. Paste any text and switch case in one click.
- Text ReverserReverse the characters, words, or individual lines of any text. Useful for debugging palindromes, creating mirror text, or just having fun with strings.
- Find & ReplaceBulk find and replace across any block of text with plain text or regex patterns. Supports case-sensitive matching, global replace, and regular expression capture groups.