How to remove duplicate lines
- Paste your list with one item per line, or open a .txt or .csv file.
- Choose whether to ignore capitals, trim spaces and drop empty lines.
- Pick which copy of each repeat to keep: the first or the last.
- Copy the result or download it as a text file. The summary shows how many lines were removed.
What each option does
| Input | Setting | Result |
|---|---|---|
| apple, Apple, apple | Default | apple, Apple |
| apple, Apple, apple | Ignore case | apple |
| apple, Apple, apple | Ignore case, keep last copy | apple (the third line) |
| “pear”, “ pear ” | Trim spaces on (default) | pear |
| “pear”, “ pear ” | Trim spaces off | “pear”, “ pear ” |
| a, (blank), b, (blank) | Remove empty lines on (default) | a, b |
Keeping the first or the last copy
Keeping the first copy is what most people expect: the list reads the same, minus the repeats. Keeping the last copy matters when a list grows over time, such as a log, a changelog or an export where later rows replace earlier ones: each line stays where it last appeared.
Need the list in alphabetical or numeric order as well? Sort lines sorts and removes duplicates in one step.
Common uses
- Cleaning a mailing list. Paste email addresses from several exports, turn on Ignore case, and get each address once in the order they came, ready to import.
- Unique values from a spreadsheet column. Copy a column of product codes or city names and remove the repeats to see each value once; the summary says how many were removed.
- Tidying log lines or keyword lists. Drop repeated lines from a log excerpt or a merged keyword list without changing the order, keeping the last occurrence when later lines matter more.