Remove Duplicate Lines
Deletes repeated lines from a pasted list, keeps the first copy in its original order, and reports which lines were duplicated.
Fill in the values and calculate
The form sends itself back to this page — results print below, computed on the server.
No results yet: fill the form above and press Calculate.
About Remove Duplicate Lines
The first copy of each line is kept and every other copy is dropped, so your list stays in the order you pasted it: this is what uniq does, not sort.
Matching can ignore the spaces around a line and, separately, upper and lower case. Either option only decides what counts as the same line; the text you keep is always the original.
The table lists the lines that appeared more than once with how many copies were dropped, which is how a tag list or a guest roster turns into a count.
Questions about Remove Duplicate Lines
Are the remaining lines sorted?
No. The order is preserved; only later repeats are deleted. Sort separately if you want an alphabetical list.
Do blank lines count as duplicates?
Blank lines are never kept, and only the first one is reported, so a gap in your paste does not stack into a wall of blanks.
Which copy survives when the case differs?
The first one. Ignoring case only decides what counts as the same line; the surviving text is always the version that appeared first.
Can I undo this here?
No, the removed lines are not kept. Copy the result before you close the page, or paste the original list again with the options set the way you want.
Bookmark and homescreen
- Press Ctrl+B now (or Cmd+B on macOS) to bookmark this page in your browser.
- Drag this link to your bookmarks bar and it will always open this tool: Remove Duplicate Lines.
- On a phone: open in Chrome/Safari and use "Add to Home Screen" — the site ships a homescreen icon and manifest, so it installs like an app.
- Two addresses work:
https://useful-utilities.com/remove-duplicate-lines/andremove-duplicate-lines.useful-utilities.com. Copy whichever you prefer.