Text

Remove Duplicate Lines From a List

Paste a list and get it back with the repeats gone. The order of the first appearance is kept unless you ask for something else, and you can flip it around to see only the lines that were duplicated.

The last two are for auditing a list rather than cleaning it.

Only visible when copies differ in case or spacing.

Matching
Output
0Lines in
0Distinct
0Repeats
0Lines out

What counts as "the same line"

Deduplication is only as good as the rule you use to decide two lines match. The tool builds a comparison key for each line — trimmed, lowercased and normalised according to the checkboxes — and treats lines with the same key as copies of each other. The line that gets printed is the original, not the key, so turning on Ignore case does not lowercase your output. It only changes what is considered a repeat.

That distinction matters when copies differ. If your list contains Acme Ltd and ACME LTD, ignoring case collapses them into one, and Which copy to keep decides which spelling survives. Keep the first is what you want for a log or an append-only list. Keep the last is what you want when later entries are corrections.

Why two identical-looking lines refuse to match

This is the single most common complaint about any deduplicator, and it is almost never a bug in the tool.

What normalisation will not fix is lookalike characters from different alphabets. Cyrillic а and Latin a are separate letters that happen to share a shape, and no normalisation form merges them. The same goes for fullwidth Latin characters and for a curly apostrophe versus a straight one. If a line stubbornly refuses to deduplicate, that is usually the reason, and you have to find and replace the character itself.

The command line version, and its trap

On a Unix shell the equivalent is uniq, and it has a gotcha that catches people for years: uniq only removes adjacent duplicates. It reads the file as a stream and compares each line to the previous one, so a list with repeats scattered through it comes out unchanged. The idiom is sort file | uniq, or just sort -u file.

This tool works differently. It keeps every distinct key in a hash map, so repeats are found no matter how far apart they are, and the original order survives. That costs memory proportional to the number of distinct lines, which is the trade uniq avoids by streaming.

Where this tool stops being the right one

Everything runs in your browser tab on a single thread. A few hundred thousand lines is fine; a multi-million-line log will freeze the tab while it works, and pasting a file that large into a text box is unpleasant before you even press anything. For those, sort -u or awk is the answer.

It is also strictly line-based. A CSV where one field contains a quoted value with a newline inside it will be split at that newline, and the two halves will be treated as separate records. Deduplicating CSV by a single column is not something a line tool can do — you need a spreadsheet or a script that understands the format.

Finally, case folding uses your browser's default rules. Those are correct for the overwhelming majority of text and wrong for a couple of known cases: Turkish dotted and dotless i do not fold the way a Turkish reader expects, and German ß uppercases to SS without a route back.

Frequently asked questions

Does it keep the original order of my list?

Yes, by default. Each distinct line appears at the position of its first occurrence. Tick "Sort the result A to Z" if you would rather have it alphabetical, which is what sort -u on the command line would give you.

How do I see which lines were duplicated instead of removing them?

Set Show to "Only lines that repeated". You get one copy of every line that appeared more than once. Tick "Prefix each line with its count" to see how many times each one showed up.

Why are two lines that look identical not being merged?

Something invisible differs: a trailing space, a non-breaking space pasted from a web page, a decomposed accent, or a lookalike character from another alphabet. Try turning on trimming and Unicode normalisation. If they still differ, the difference is a character you cannot see and you will need to replace it directly.

Is there a limit on how much text I can paste?

No hard limit, but everything runs on the main thread of your browser tab. A few hundred thousand lines processes in well under a second. Millions of lines will make the tab unresponsive while it works, and a command-line tool is the better choice there.

Is my list sent to a server?

No. The whole thing is JavaScript running in your tab. Nothing is uploaded, nothing is logged, and closing the page discards the text.

Last updated September 19, 2026