Remove Duplicate Lines Case Insensitive — Online Free Tool
Updated: May 2026
Standard deduplication treats "Apple" and "apple" as two different lines. Case-insensitive deduplication treats them as one — which is what you almost always want for real data. This page explains when to use it and how to enable it.
Enable "Case insensitive" in the options panel to catch all variants.
Open the tool →What case-insensitive deduplication does
When case-insensitive mode is active, the tool lowercases each line internally before comparing it to previously seen lines. The original casing of the first occurrence is preserved in the output — only the comparison is case-insensitive.
The first occurrence of [email protected] is kept, and the two other capitalizations are removed as duplicates.
When you need case-insensitive mode
Case-sensitive deduplication (the default) is correct for data where capitalization carries meaning — file paths on Linux, programming language identifiers, passwords. For most content-level data, you want case-insensitive mode:
- Email addresses — the email protocol treats addresses as case-insensitive by convention.
[email protected]and[email protected]reach the same inbox. - Keyword lists —
best running shoesandBest Running Shoesrepresent the same search intent. - Domain names —
Example.comandexample.comare the same host. - Product names entered manually by different people often have inconsistent capitalization.
- Tags and categories in CMS exports often have mixed casing depending on how they were created.
- City and country names from form inputs where users typed freely.
Combining with trim whitespace
Case differences and whitespace padding are often introduced by the same process — manual data entry or sloppy exports. Enable both "Case insensitive" and "Trim whitespace" together to catch all near-duplicates that differ only in formatting.
The combined effect: [email protected] and [email protected] are treated as the same line. The first occurrence (after trimming) is kept in the output.
Which occurrence is kept?
By default, the tool keeps the first occurrence. You can switch to keeping the last occurrence using the toggle in the tool. This matters when the casing of the first occurrence is not the canonical form you want.
Example: if your list has APPLE first (from an old export) and Apple second (from a newer, cleaner export), switch to "Keep last" to retain the properly cased version.
Frequently asked questions
Does case-insensitive mode change the output casing?
No. The original casing of the kept line is preserved in the output. Case insensitivity only affects which lines are treated as duplicates, not how they are written.
Does it handle Unicode characters with case variants?
The tool uses JavaScript's native toLowerCase(), which handles standard Unicode case folding for most Latin-script characters, including accented letters (é→é, Ü→ü, etc.).
Can I use case-insensitive mode with sorting?
Yes. Enable both "Case insensitive" and "Sort output" simultaneously. Deduplication runs first, then the unique lines are sorted alphabetically.