Remove duplicate lines
Delete repeated lines from a list and keep the first of each, with options to ignore case and spacing, and a count of what was removed.
Runs in your browserNothing uploadedWorks offline
Loading Remove duplicate linesRuns on this device. Nothing is uploaded.
Questions
Which copy of a repeated line is kept?
The first one, in its original position and spelling. Switch to "Keep last" to keep the final copy instead; the order of the remaining lines never changes.
Can I see which lines were repeated?
Yes. Below the result there is a list of every line that appeared more than once and how many times it appeared.
Is there a size limit?
Lists of hundreds of thousands of lines work fine, since everything runs on your device. Very large files are limited only by your browser's memory.
Related tools
All text and documents toolsText and documentstxt md plaincamelCase converterTurn phrases, column names or snake_case into camelCase identifiers, one per line, as you type.Text and documentstxt md plainCase converterChange text to UPPER, lower, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE as you type.Text and documentstxt md markdownCharacter counterCount characters as you type, spaces included, with the count without spaces, words and sentences next to it.Text and documentstxt md plainClean AI textFix text pasted from ChatGPT, Claude and terminals: show and remove hidden characters, rejoin broken lines, fix quotes, spaces and Markdown.Text and documentstxt md csvCompare text (diff)Compare two texts or files side by side or inline, by line, word or character, with changes highlighted and a downloadable patch.Text and documentstxt md plainCONSTANT_CASE converterTurn phrases or camelCase names into CONSTANT_CASE, also called SCREAMING_SNAKE_CASE, for constants and environment variables.