Remove duplicate lines
Numbers & text
Paste a list. Duplicates are removed and the count of what went is shown, so you can check it did what you expected.
Runs in your browser
Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.
About this tool
Trim before comparing
Two lines that look identical often are not: a trailing space, a tab, or a non-breaking space pasted from a spreadsheet makes them different strings.
Turn on trim each line first and leading and trailing whitespace is ignored for the comparison. The surviving lines keep their original text.
Questions
Does it keep the original order?
Yes. The first occurrence of each line stays where it was. If you would rather keep the last occurrence, there is an option for that.
Can I see which lines were duplicated?
The count removed is shown. For a line-by-line comparison of two lists, use the text compare tool instead.
Related tools
Sort linesSort lines alphabetically, numerically, by length, in reverse or at random. Sorting is language-aware, so accented letters land where that language puts them.Clean whitespaceCollapse double spaces, trim lines, remove empty lines and line breaks, convert tabs, and strip the invisible Unicode spaces that text pasted from a PDF carries.Compare textsSee exactly what changed between two versions of a text, line by line, with additions and removals marked. Nothing is uploaded.