Remove Duplicate Lines
Removes repeated lines while keeping the original order, or shows you only the duplicates instead.
Loading the tool…
How to use this tool
- Paste the list.
- Decide what counts as the same line: surrounding spaces and letter case can each be ignored.
- Choose whether to keep the first of each line, only the lines that repeat, or only the lines that appear once.
- Select De-duplicate. The summary reports how many lines went in and how many came out.
What duplicate line remover does
De-duplicating a list is easy; de-duplicating it without scrambling the order is the part that matters. Sorting a file to remove duplicates destroys whatever order the file had, which is fine for a word list and wrong for a log, a changelog or a query result. Here the first occurrence of each line stays exactly where it was and later copies are dropped.
The other two modes are often more useful than de-duplication itself. Keeping only the duplicates tells you which values repeat, which is how you find a broken join or a double-loaded batch. Keeping only the lines that appear exactly once tells you what is missing from the other side of a comparison. Whitespace and case can each be ignored when deciding what counts as the same line.