Remove duplicate lines from any text instantly.
Duplicate Line Remover scans a block of text and strips out any line that repeats, leaving only the first occurrence of each unique line. Paste a list, choose whether matching should ignore case or extra whitespace, and get a cleaned-up version instantly โ all processed locally in your browser.
Made for writers and students. Typical uses:
A list of seven lines (apple, Banana, apple, " banana" with spaces, an empty line, cherry, cherry) returns four lines with the default settings: apple, Banana, an empty line and cherry, with three removed. Switching on case-sensitive matching keeps both Banana and banana and returns five lines.
Lines count as duplicates only if they match exactly under your settings, so "Acme Inc" and "Acme, Inc." are different lines. Near-duplicates and typos are not detected, and the tool works on whole lines, not on words inside a line.
Accuracy: Results follow documented rules and are tested with known inputs. Review the output before relying on it.
Expert Tip
Run it twice with different settings on important lists: first case-insensitive with trimming to catch the obvious repeats, then use "show only repeated lines" to review exactly what was treated as a duplicate.
The Duplicate Line Remover scans a list and removes every line that repeats, keeping one copy of each. Take a list of seven lines: apple, Banana, apple, " banana" (with spaces), an empty line, cherry and cherry. With the default settings it returns four lines, apple, Banana, an empty line and cherry, and tells you three were removed.
The order of the lines is preserved, so the result reads the same as your original, only without the repeats.
How you decide two lines are the same changes the result, so each rule is a setting.
Email and contact lists collect duplicates when they are merged. Keyword lists exported from several tools overlap. Log files and URL lists contain repeats that hide the interesting lines. Removing duplicates before you import data into a spreadsheet or a mailing tool avoids double entries and double sends.
The "only repeated lines" mode is a quick audit: it shows which entries appeared more than once, so you can find where the duplicates came from.
Sort first if you want the cleaned list in order: the Text Sorter sorts alphabetically, numerically or by length. To compare two lists and see what differs, use the Text Diff Checker. To count the lines before and after, the Line Counter does it, and the Word Counter reports lines as well.
The processing happens in your browser, so lists of customers or addresses are not uploaded.
Keeping the first or the last occurrence changes the order of the result. For the list v1, v2, v1, v3, v2, keeping the first occurrence gives v1, v2, v3, while keeping the last gives v1, v3, v2, because each line is placed where it last appeared. Use the last occurrence when later entries replace earlier ones, such as a log of updates.
For an email list of a@x.com, b@x.com, A@x.com, c@x.com and b@x.com, case-insensitive matching with trimming leaves three addresses: a@x.com, b@x.com and c@x.com. Most mail providers treat the part before the @ sign as case-insensitive, so this is usually what you want, but check if your system distinguishes them.
Explore more in Text Tools, read the guides and articles, or see how we test our tools.
Count lines in any text instantly.
Best for checking how many lines of code a snippet has before pasting into a form with line limits
Sort text lines alphabetically (A-Z or Z-A).
Best for alphabetizing a contact list or spreadsheet column before import
Remove extra whitespace, tabs, and line breaks from text.
Best for fixing double spaces left by typing or by pasting from a layout
Count words, characters, sentences, and paragraphs in any text.
Best for checking word count for essays, articles, and blog posts
Remove unwanted line breaks from text instantly.
Best for fixing text copied from a PDF where every line ends with a hard break