Sort the lines of any text block alphabetically or numerically, ascending or descending, with optional case sensitivity and duplicate removal.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool is a general-purpose line sorter, it handles both alphabetical and numerical sorting for any kind of list, numbers, mixed content, code, or plain words. Our Alphabetizer, by contrast, is purpose-built for alphabetizing named lists (like bibliography entries or a list of authors), including an option to ignore leading articles ('a', 'an', 'the') when sorting, a specific convention this general sorter doesn't apply.
Alphabetical sorting compares lines as text, character by character. Numerical sorting instead parses the leading number from each line and compares those values directly, so '9' correctly sorts before '10' (alphabetical sorting would place '10' before '9', since '1' comes before '9' character by character).
Sorting the three lines '9', '10', '2' with Numerical (Ascending) gives '2', '9', '10', the actual numeric values are compared, so 10 correctly lands last. Sorting those same three lines Alphabetically (A-Z) instead would give '10', '2', '9', since character-by-character text comparison sees '1' as coming before '2' or '9', regardless of the numbers' actual size.
Using Alphabetical sort on a list of numbers and expecting numeric order, text sorting compares characters left to right, so '10' sorts before '2', use Numerical sort instead when the lines represent actual quantities.
Forgetting that numerical sort only reads the leading number in each line, a line like '5 apples' sorts by the leading '5', but a line with no leading number at all is treated as infinitely large and pushed to the end.
Not realizing case sensitivity changes alphabetical order, with case-sensitive sorting on, all uppercase letters sort before all lowercase letters in standard character-code order, producing a different order than a case-insensitive sort of the same list.
Lines that can't be parsed as a number are treated as having an infinitely large value and pushed to the end of the ascending sort (or the start of the descending sort).
Yes, with case-sensitive sorting enabled, uppercase and lowercase letters may sort differently than with it disabled, since the comparison then treats 'Apple' and 'apple' as distinct values.
Google AdSense Banner
This area will contain advertisements after approval.