Remove Duplicate Lines From Text
Paste a list and this tool drops every repeated line while keeping the first copy of each in the exact order you pasted it. It normalises Windows and Mac line endings before comparing, and a live counter shows how many duplicates were removed. Two switches control whether matching cares about letter case and about the spaces around each line.
How to remove duplicate lines
- Paste your list or block of text into the Your text box.
- Leave Case-sensitive on to treat Apple and apple as different, or turn it off to merge them.
- Leave Ignore surrounding spaces on so padded copies of a line still count as duplicates.
- Watch the duplicates removed counter update as you edit.
- Click Copy to take the de-duplicated result from the Result box.
Examples
Dedupe a list and keep the original order
apple banana apple cherry banana
apple banana cherry
Case-insensitive match merges Apple and apple
apple banana apple Apple
apple banana
Repeated blank lines collapse to one
red red blue
red blue
Frequently asked questions
Does it keep the original order?
Yes. The first time a line appears it stays in place, and later duplicates are dropped, so the sequence you pasted is preserved. It is not sorted, so if you want an alphabetical result run the output through a line sorter afterwards.
Is the comparison case-sensitive?
By default yes, so Apple and apple are treated as two different lines. Turn off Case-sensitive to fold them together, in which case the first spelling encountered is the one kept.
What about leading or trailing spaces?
By default surrounding whitespace is ignored when comparing, so ' item' and 'item' count as the same line. The kept line keeps its original spacing. Turn off Ignore surrounding spaces to treat differently padded lines as distinct.
How are blank lines handled in the tool?
In the web tool blank lines are compared like any other line, so a second empty line is removed as a duplicate. That means runs of blank lines collapse to a single one in the result.
Does it change the text on the lines it keeps?
No. Trimming and case folding only affect the comparison key, never the output. The lines you keep are written back exactly as you pasted them, including their spacing and capitalisation.
Which line endings does it understand?
Windows CRLF and classic Mac CR are converted to Unix LF before splitting, so text from any operating system deduplicates correctly. The result is joined back with LF line feeds.
Can it remove duplicate words or items on one line?
No. This tool works line by line only. To deduplicate comma-separated values on a single line, split them onto separate lines first, dedupe, then join them again.
Is there a size limit?
There is no hard limit. Everything runs in your browser, so the ceiling is your device memory, and lists with thousands of lines are handled instantly.
Is my text private?
Yes. All processing happens locally in your browser and nothing is uploaded to a server, so private lists stay on your device.
Learn more
- How to deduplicate a list without losing order
When to keep first-seen order, how case and whitespace change what counts as a duplicate, and how line dedupe differs from sorting unique values.
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.
Acronym Generator
Turn any phrase into an acronym from the first letter of each main word. Skip small words like the and of, keep them, or add dot separators.
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.
AI Sentiment Analyzer
Analyze the sentiment of any text with AI in your browser. Paste a review or comment, get a positive or negative score plus a per-sentence breakdown.
AI Text Summarizer
Summarize any text with AI, right in your browser. Paste an article, pick a length, and get a short abstractive summary. Nothing is uploaded.