Strip repeated lines from a list, optionally case-insensitive.
Free to use, no sign-up required. Remove Duplicate Lines is one of 198 tools built into Xenition, alongside a chat that can use them for you.
Removes repeated lines from a list, or repeated sentences from a paragraph, and keeps the first copy of each. Handy for cleaning email lists, keyword lists, log output or pasted data.
Each line (or sentence) is compared after trimming spaces from both ends, and with case-insensitive on it is also lowercased for the comparison. The first occurrence is kept in its original form and position; later matches are dropped. Blank lines are never treated as duplicates. Sentences mode splits after . ! ? … or । followed by whitespace and joins the kept sentences with single spaces.
The six lines apple, Banana, apple, banana, “ cherry” and cherry leave apple, Banana, banana and “ cherry” with 2 duplicates removed. With case-insensitive ticked, banana also goes, leaving three lines and 3 removed.
The comparison trims both ends of each line, so “ cherry” and “cherry” match. The copy that appears first is the one kept, spaces included.
In Lines mode a paragraph is a single line, so a repeated sentence inside it is not a duplicate line. Switch to Sentences mode, which splits on sentence-ending punctuation. Note that Sentences mode rejoins everything with spaces, so paragraph breaks are not kept.
You do not have to open Remove Duplicate Lines to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.