Skip to content
PBPasteBench

Sort and Deduplicate Lines

Clean up a list: drop repeats, sort it, strip blanks and stray whitespace. Sorting is natural, so item2 comes before item10.

0 lines

Cleaned lines appear here

Order

Common questions

Why does item10 sort after item2 here but not elsewhere?+

Sorting is natural: runs of digits compare as numbers. Plain lexicographic order compares character by character, which puts item10 before item2 because 1 precedes 2.

Does removing duplicates keep the first or the last?+

The first occurrence stays and later repeats are dropped, so the original order of what remains is preserved.

More tools