How to use the remove duplicate lines
- 1Paste your list into Text with duplicate lines, one item per line.
- 2Choose whether capital letters and surrounding spaces should count as differences.
- 3Copy the result from Unique lines, or switch Show to Removed duplicates to see what was taken out.
Example
apple banana Apple cherry banana date cherry
apple banana Apple cherry date
With the default settings, “cherry ” (with a trailing space) matches “cherry”, and the empty line is removed. Tick Ignore case and “Apple” is removed too.
Keeping the first or last occurrence
By default the first time a line appears is kept and later copies are removed, so the list keeps its original order. Choose The last occurrence when later lines are more up to date, for example in a log where the newest entry is at the bottom. Choose No copies to keep only lines that appear exactly once, which is useful for finding the items two lists don't share.
Case and whitespace matching
Lines are compared exactly unless you tell the tool otherwise. Ignore case treats “Apple” and “apple” as the same line; the version that is kept is the one that appears first. Ignore leading and trailing spaces stops invisible spaces, common in data pasted from spreadsheets, from making two identical-looking lines count as different.
Seeing which lines were removed
Switch Show to Removed duplicates to list every line that appeared more than once, with the number of times it appeared (for example banana ×2). The same settings apply, so this view always matches what the unique list removed.
Sorting after deduplication
This tool never reorders your lines. If you also want the list in alphabetical order, paste the result into sort lines. To compare two separate lists rather than clean one, use the list comparison tool.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
