- Lines removed
- 2
How to use
- Paste your text into the Input box, one item per line.
- Choose Exact match or Ignore case. Duplicates disappear from the Output right away, and Lines removed shows how many went.
- Press Copy to copy the cleaned list.
Examples
| Input | Output |
|---|---|
apple
banana
apple
cherry | apple
banana
cherryLines removed: 1 |
Tokyo
tokyo
Osaka | Tokyo
OsakaLines removed: 1 |
About this tool
How duplicates are found
The text is split into lines, and each line is checked against the lines above it. The first time a line appears it's kept; every later copy is removed. The order of what remains doesn't change, so the result is your original list minus the repeats, not a sorted list.
The two modes differ in what counts as "the same":
- Exact match compares lines character for character. Tokyo and tokyo are different lines, and so are red and red followed by a stray space.
- Ignore case compares lines after lowercasing them and trimming spaces and tabs at both ends. Tokyo, tokyo and * TOKYO* all count as one, and the version that appears first is the one you keep, with its original capitalization.
The Lines removed counter shows how many lines were dropped.
Blank lines count too
An empty line is a line like any other. The first blank line stays and later ones are removed, which can run paragraphs together. When you're cleaning a list that's usually what you want; with prose, check the result.
Typical jobs
- Cleaning a mailing list merged from two exports before importing it.
- Combining keyword lists, tags or product SKUs.
- Collapsing repeated entries in a log file to see which distinct messages occurred.
- Measuring how repetitive a list is: compare Lines removed with the original line count.
Tips
A single column copied from Excel or Google Sheets arrives one cell per line, so you can de-duplicate it directly. If two lines look identical but both survive, they probably differ by a trailing space or tab; switch to Ignore case, which trims the ends. For a sorted list of unique items, remove the duplicates here and then sort the result alphabetically.
Frequently asked questions
Does removing duplicates change the order of my list?
No. The first occurrence of each line stays where it was, and later repeats are removed. The list isn't sorted.
Which copy is kept?
The first one. In Ignore case mode, the first version keeps its original capitalization; for example, "Tokyo" is kept and a later "tokyo" is removed.
Why weren't two lines that look the same removed?
They probably differ by a space at the end or by capitalization. Switch to Ignore case, which ignores capitalization and spaces at the start and end of each line.
Are empty lines removed?
Repeated empty lines are. The first blank line is kept and later blank lines count as duplicates.