Remove Duplicate Lines
Remove duplicate lines from a list: keep the first or last copy or only unique lines, ignore case and spaces, drop blanks, sort, and see which lines repeated.
| Line | Times found |
|---|---|
| banana | 3 |
| cherry | 2 |
Clean up a mailing list, a keyword list, log lines or any pasted column by removing lines that appear more than once. You decide whether the first or the last copy survives, or whether every repeated line should go, whether “Apple” and “apple” count as the same, and what happens to empty lines. A table shows which lines were repeated and how often.
How to use this tool
- Paste your list, one item per line.
- Choose which copy to keep, or keep only the lines that appear once.
- Tick “ignore case” and “ignore spaces” if small differences should not matter.
- Optionally sort the result, then copy it.
Formula
Two lines are duplicates when their comparison keys match: key = line (trimmed if chosen, lower-cased if case is ignored)
The original order is kept unless you choose to sort. “First copy” keeps each line where it first appears, “last copy” where it last appears, and “only unique” removes every line that has a twin. Empty lines are removed by default; they can also stay in place or be treated like any other line. The output keeps the wording of the copy it keeps, so with “ignore case” the first spelling wins.
Example
The sample has 7 lines: apple, banana, Apple, cherry, banana, “ cherry” and banana. With the defaults (first copy, case matters, spaces ignored) the result is apple, banana, Apple, cherry: 3 lines removed, and the table shows banana found 3 times and cherry 2 times. Ticking “ignore case” also removes Apple.
Frequently asked questions
How do I remove duplicates but keep the order?
That is the default: leave “Then sort” on “No”. Each line stays where its first copy was.
How do I find the duplicate lines instead of removing them?
Look at the “Repeated lines” table under the result, which lists every line that appears more than once and how many times.
Does it work with Excel columns?
Yes. Copy a column from Excel or Google Sheets, paste it here (one cell per line), remove duplicates and paste the result back.
Last updated:
Page address with these inputs: https://kakao.mobile/tools/remove-duplicate-lines-tool/
Cite or embed this tool
kakaoCalc. (2026, November 8). Remove Duplicate Lines. https://kakao.mobile/tools/remove-duplicate-lines-tool/
“Remove Duplicate Lines.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/remove-duplicate-lines-tool/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms