--- title: "Remove duplicate lines — free, runs in your browser" description: "Strip repeated lines from a list, keeping the first occurrence of each. Free, no sign-up, and nothing you enter leaves your browser." url: https://atoneplace.net/tools/remove-duplicate-lines/ site: "At One Place" --- # Remove duplicate lines Strip repeated lines from a list, keeping the first occurrence of each. ## How it works Paste a list and get it back with repeats removed. The first occurrence of each line is kept in its original position, so the order you had is preserved rather than sorted away. Two options change what counts as a duplicate. Ignoring case treats "Apple" and "apple" as the same line. Trimming whitespace first means a line with a trailing space matches one without — which is the usual reason two lines that look identical are not, and the single most common source of confusion with this kind of tool. Nothing is uploaded. The whole operation happens in your browser, so it is safe to paste a list you would not send to a server. > This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected. ## Common questions ### Does this keep the original order? Yes. The first occurrence of each line stays where it was; only later repeats are removed. ### Why are two identical-looking lines not being merged? Almost always trailing whitespace or a different case. Turn on trim and ignore case and they will match. ## Related pages - [Word and character counter](https://atoneplace.net/tools/word-counter/) - [Typing speed test](https://atoneplace.net/tools/typing-speed-test/) - [Sort lines alphabetically](https://atoneplace.net/tools/sort-lines/) - [JSON formatter and validator](https://atoneplace.net/tools/json-formatter/) - [Text compare](https://atoneplace.net/tools/text-diff/) - [Regex tester](https://atoneplace.net/tools/regex-tester/) - [Case converter](https://atoneplace.net/tools/case-converter/) - [Remove empty lines](https://atoneplace.net/tools/remove-empty-lines/) - [Find and replace](https://atoneplace.net/tools/find-and-replace/) - [Readability checker](https://atoneplace.net/tools/readability-checker/)