Sort and Dedupe Lines

Why 1, 10, 100, 2 is not a bug

Sorting text compares one character at a time, so "10" comes before "2" for the same reason "ab" comes before "b" — the first character decides it. That is correct alphabetical order and it is almost never what you want for a list of numbers. Choose numeric sorting and the lines are read as numbers instead.

Trailing spaces break matching

Two lines that look identical will not match if one ends in a space, because a space is a character like any other. This trips up deduplication constantly — the list still has both entries and nothing appears wrong. Trimming is on by default here for exactly that reason.

Removing duplicates versus finding them

Silently removing a duplicate is fine for a mailing list. It is the wrong move when the duplicate is the thing you were looking for — a repeated invoice number, an order counted twice. "Keep only the duplicated lines" shows you those and nothing else, and the panel underneath always lists exactly what was taken out so nothing disappears without you seeing it.

Nothing leaves your browser

The lists people sort are customer emails, phone numbers and order references. All of it is processed in the page on your own machine — there is no upload and no server involved.

Share this tool with friends

Free to use, no sign-up, works on any phone.

Frequently Asked Questions

Why does my numbered list sort as 1, 10, 100, 2?

Because that is alphabetical order, where "10" comes before "2" the same way "ab" comes before "b". Switch to numeric sorting and the numbers are read as numbers. This is the single most common surprise with any sorting tool.

Does removing duplicates keep the first or the last?

The first occurrence, and the original order is preserved unless you also sort. That means you can dedupe a list without shuffling it, which matters when the order carries meaning.

What does "keep only duplicates" do?

It shows you the lines that appeared more than once and nothing else — useful for finding the repeated entry in a list of email addresses or invoice numbers rather than just quietly removing it.

Is the comparison case sensitive?

You choose. With case ignored, "Delhi" and "delhi" count as the same line; with it respected they are two different lines. Email addresses are usually best compared with case ignored.

What about spaces at the ends of lines?

Trailing spaces are invisible and they stop two identical-looking lines from matching. There is an option to trim them, and it is on by default for that reason.

Is my list uploaded?

No. It is all processed in your browser, which matters if the list is customer emails or anything else you should not be pasting into a stranger's server.

Everything on this page runs inside your own browser. Nothing you type or upload is sent to a server, so your data never leaves your device.