What is a Remove Duplicate / Empty Lines?
This tool cleans up messy line-based text — lists, CSV-like data, log output, or exported records — by removing duplicate lines, empty lines, or both, with an option to also trim leading and trailing whitespace from every line. It's the kind of small, repetitive cleanup task that's tedious to do manually in a text editor once a list grows past a few dozen lines, especially when duplicates aren't next to each other and are easy to miss by scanning visually.
When to use it
This is useful when you've merged two lists (like combining email addresses from two exports) and need to remove the overlap, when cleaning up a copy-pasted list that picked up blank lines from the source formatting, or when preparing a wordlist or dataset where duplicate entries would skew a count or a lookup. It's also handy for tidying a list of URLs, file paths, or log entries before feeding them into another tool or script that doesn't handle duplicates or blank lines gracefully.
How it works
The tool splits your input on line breaks, then applies your selected filters in sequence: trimming whitespace from each line first (if enabled), removing lines that are now empty (if enabled), then removing duplicates by tracking which lines have already been seen and dropping any repeat. The case-sensitive toggle controls whether "Apple" and "apple" are treated as the same line or as different lines during the duplicate check — useful when you specifically care about, or want to ignore, capitalization differences.
Frequently asked questions
Does this tool preserve the original order of my list?
Yes — when removing duplicates, the first occurrence of each line is kept in its original position, and only later repeats are removed. The list isn't sorted or reordered.
What counts as a 'duplicate' if the lines have different spacing?
That depends on whether "Trim whitespace" is enabled. With it on, "apple" and " apple " (with extra spaces) are treated as duplicates. With it off, they're treated as different lines since the whitespace itself is part of the comparison.
Can I remove duplicates while keeping empty lines, or vice versa?
Yes — the two options are independent checkboxes, so you can enable just one, both, or neither depending on what you're trying to clean up.