Remove Duplicate Lines From Text
Paste a list to strip out duplicate lines while keeping the first of each in its original order. Choose whether matching is case-sensitive and whether surrounding spaces are ignored.
How to remove duplicate lines
- Paste your list or text into the box.
- Pick whether matching is case-sensitive and whether to ignore extra spaces.
- Copy the de-duplicated result.
Examples
Dedupe a list, keeping order
apple banana apple cherry banana
apple banana cherry
Frequently asked questions
Does it keep the original order?
Yes. The first time a line appears it is kept in place, and later duplicates are dropped, so the order you pasted is preserved.
Is the comparison case-sensitive?
By default yes, so 'Apple' and 'apple' are treated as different lines. Turn off case sensitivity to treat them as the same.
What about leading or trailing spaces?
By default surrounding whitespace is ignored when comparing, so ' item' and 'item' count as duplicates. You can turn trimming off to keep them distinct.
How are blank lines handled?
Repeated blank lines are collapsed to one by default. Enable 'keep blank lines' to leave every empty line exactly where it is.
Is my text private?
Yes. Everything runs in your browser and nothing is uploaded to a server.
Related tools
Sort Lines
Sort lines of text alphabetically or numerically online. Reverse the order, ignore case, and remove duplicate lines, then copy the result. Free and private.
Remove Line Breaks
Remove line breaks and paragraph breaks from text online. Flatten copied text into one line, keep spaces tidy, then copy the result. Free and private.
Add Line Numbers
Add line numbers to any text online. Set the start value, step, and separator, pad numbers to align, and copy or download the result. Free and private.
Bullet List Maker
Turn lines of text into a bullet or numbered list online. Pick dash, asterisk, dot, arrow or numbers, add indent, then copy. Free and private.
Caesar Cipher
Encode and decode text with the Caesar shift cipher. Pick any shift, see the result live, and brute force all 25 shifts. Runs entirely in your browser.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Free and private.