Remove Duplicate Lines

Remove duplicate lines, or count how many times each line repeats — case-insensitive, trim and blank-line options. Free, in your browser.

\n = new line, \t = tab
Unique lines

🔒 Deduplicated in your browser — nothing is uploaded.

One copy of each line, order kept

Paste a list or block of text and this tool removes every repeated line, leaving one copy of each unique line. The first time a line appears it is kept in place, so the original order of your list is preserved, and a live counter shows how many duplicate lines were removed and how many unique lines remain.

Options that match your data

Turn on case-insensitive to treat Apple and apple as the same line (the first spelling is kept), trim whitespace to ignore leading and trailing spaces when comparing, ignore blank lines to drop empty rows entirely, and sort output to return the unique lines in alphabetical order. Everything runs locally in your browser, so even long or sensitive lists never leave your device. Need to reorder or count instead? Try the text sorter or word counter.

Counting mode: how often does each line appear?

Switch to count duplicates and the same list comes back as a table instead: every distinct line with the number of times it appears, most frequent first, plus totals for how many lines you gave it, how many are distinct, how many repeat and how many appear exactly once. Below the table are two copyable lists — the entries that appear only once, and the entries that appear more than once — so you can lift just the one-offs or just the repeats. The case, whitespace and blank-line options mean the same thing in both modes, so switching cannot quietly change what counts as the same line, and the mode travels in the URL as ?mode=count if you want to share it.

Frequently asked questions

Does it keep the original order of my lines?

Yes. By default the first occurrence of each line stays exactly where it was, so your list keeps its order. Enable the sort option if you would rather get the unique lines back in alphabetical order.

Can it ignore case and extra spaces when finding duplicates?

Yes. Turn on case-insensitive to treat different capitalizations as the same line, and trim whitespace to ignore leading and trailing spaces. In both cases the first version it saw is the one that is kept.

Is my text uploaded anywhere?

No. All processing happens in your browser with JavaScript. Your text is never sent, stored, or uploaded, so even confidential lists stay private.

Can it count how many times each line appears?

Yes. Switch to count duplicates and the same list comes back as a table: every distinct line with how many times it appears, most frequent first, plus separate copyable lists of the entries that appear once and the entries that repeat. The old Group and Count List Items tool is now this mode.