All tools › Text, Fonts & Symbols › Text Utilities
Paste a list, one item per line, and get it back with every repeated line removed.
Delete repeated lines from a list
Paste a list with one item per line and this tool removes the repeats, so every line appears once. It reports how many duplicate lines were removed and which lines were repeated most.
Use it to clean up email lists before a mailing, merged shopping or packing lists, keyword lists, product codes, names copied from several spreadsheets, or log lines. The work is done in your browser. The list is not uploaded or saved.
How to remove duplicate lines
- Paste the list into Your lines, one item per line.
- Under Capital letters, decide whether “Apple” and “apple” are different lines or the same line.
- Leave Spaces at the start and end of a line on Trim them, unless those spaces matter to you.
- Choose whether to remove Empty lines or keep them all.
- Under Which copy to keep, pick the first or the last one.
- Set the Order of the result: original order, A to Z or Z to A.
- Press Copy next to the cleaned text.
How lines are compared
duplicates removed = lines in – empty lines removed – lines out
The text is split at every line break. If trimming is on, spaces and tabs at both ends of each line are cut off first. Two lines are duplicates when they are then exactly the same, character for character. With capital letters ignored, both lines are compared in lowercase.
The tool walks down the list and gives every line a count. With “the first one” kept, a line stays where it first appears and later copies are dropped. With “the last one” kept, the earlier copies are dropped and the line stays at its last position. That matters when lines differ only in capitals: the copy you keep is the spelling you get.
Empty lines are never treated as duplicates of each other. They are either all removed or all kept in place. A line with only spaces counts as empty.
Sorting, when chosen, happens last. It compares lines by character code, which puts digits before capital letters and capital letters before small letters. With capital letters ignored, the lowercase form is used for sorting too.
Worked example
Paste these nine lines: milk, eggs, Bread, milk, an empty line, bread, apples, “eggs ” with a space after it, and milk. Leave every option as it loads.
| Row | Value |
|---|---|
| Result | 3 duplicate lines removed |
| Cleaned text | milk, eggs, Bread, bread, apples (one per line) |
| Lines in | 9 |
| Lines out | 5 |
| Duplicates removed | 3 |
| Empty lines removed | 1 |
| Lines that were repeated | 2 |
The table of most repeated lines shows milk found 3 times (2 copies removed) and eggs found 2 times (1 copy removed). The second “eggs” matched only because its trailing space was trimmed. “Bread” and “bread” both stay, since capital letters count by default.
Now switch Capital letters to ignore them and sort A to Z. The result becomes “4 duplicate lines removed” and the cleaned text is apples, Bread, eggs, milk.
Reading the result
Lines in counts every line you pasted, empty ones included. Lines out is what is left. Lines that were repeated is the number of different lines that appeared more than once, which is usually smaller than the number of copies removed. The Compared and Order rows repeat your settings.
What this tool does not do
- It compares whole lines only. “Ann Lee” and “Lee, Ann” are different lines, and so are “ann@example.com” and “ann@example.com;”.
- Spaces inside a line are not changed. “New York” with two spaces differs from “New York”.
- Accented and plain letters are different: “Jose” and “José” both stay.
- It does not look inside spreadsheet rows. To compare by one column, paste only that column.
- The text can be up to 100,000 characters.
Tips for cleaner lists
For email addresses, ignore capital letters, because the same address is often typed both ways. If a list came from a spreadsheet, keep trimming on: stray spaces at the end of a cell are the most common reason two lines that look alike are not removed.
Frequently asked questions
Does the order of my list change?
Not unless you ask for sorting. By default the lines that remain stay in their original order.
Can I see which lines were duplicated?
Yes. The table under the result lists up to ten of the most repeated lines with how many times each was found.
Why are two lines that look the same both still there?
They differ in something hard to see, such as capital letters, a double space inside the line or a look-alike character. Try ignoring capital letters first.
Does it work with comma-separated items?
Not directly, because it compares lines. Put each item on its own line first, for example with a find and replace that turns each comma into a line break.
Related calculators
- Sort Lines Alphabetically – more sort orders, including by length and natural number order.
- Find and Replace Text – turn commas into line breaks before cleaning a list.
- Word Counter – count words and lines in the cleaned text.
- Random Team Generator – split a cleaned list of names into teams.

