What the tool does
This tool reads your text one line at a time and compares the lines with each other. By default it keeps the first copy of every line and drops the rest, so the order of your list stays as it was. The counters show how many lines went in, how many came out and how many duplicates were removed.
Before
apple Banana apple Banana cherry banana
After
apple Banana cherry banana
How lines are compared
Two lines count as the same when their comparison text is identical. With the defaults, spaces at the start and end of a line are ignored, so " Banana" matches "Banana", but capitals matter, so "banana" is kept as a different line. Turn off Case sensitive to treat them as the same, or turn off Trim spaces to compare lines exactly as typed. Whichever copy is kept appears in your result unchanged, with its original spacing and capitals.
Three ways to look at your list
- Remove duplicates keeps one copy of each line. Choose whether it is the first or the last occurrence.
- Show only duplicates lists each repeated line once, followed by how many times it appeared, such as
apple (3×). - Keep only lines that appear once drops every line that has a twin, which is useful for finding what two merged lists do not share.
First or last, and sorting
Keeping the first occurrence preserves the order in which items first appeared. Keeping the last occurrence keeps each line where it appeared for the final time, which helps when later entries are newer and should win. You can also sort the result from A to Z or Z to A. For more sorting choices, such as numeric or by length, use the line sorter.
Tips and common mistakes
If lines that look identical are not being removed, they probably differ in a way you cannot see, such as a trailing tab, a non-breaking space or a zero-width character. Run the text through the line break and invisible character cleaner first. Remember that empty lines are lines too: leave Remove empty lines off if the gaps matter to you.