How to Sort a List of Numbers Correctly (Not Alphabetically)
You sort a list of numbers and get 1, 10, 100, 2, 25, 3 instead of 1, 2, 3, 10, 25, 100. Nothing is broken - this is a text sort being applied to values that are technically text, not numbers, even though they look like numbers to you.
Quick answer
A standard alphabetical sort compares numbers character by character, so '10' sorts before '2' because '1' comes before '2' as a character. To sort correctly, you need a numeric sort that parses each value and compares actual magnitude. Paste your list into Text Fixer and choose the 0→9 (or 9→0) sort option instead of A→Z.
Sort your list numerically now. Free, no account needed.
Open Text Fixer →Why this happens
A text (alphabetical) sort compares strings character by character, left to right - the same way a dictionary orders words. When it compares "10" and "2", it looks at the first character of each: "1" comes before "2", so "10" sorts first - the fact that ten is numerically larger than two never enters into it, because the sort has no concept of "value," only characters.
This shows up constantly with data pulled from a CSV export, copy-pasted from a web page, or any column that was formatted or typed as text at some point rather than as a genuine number.
How to fix it without Excel
- Paste your list into Text Fixer. One value per line.
- Choose 0→9 (ascending) or 9→0 (descending) from the sort options, instead of A→Z or Z→A.
- Copy the result. Every value is parsed as a number and sorted by actual magnitude.
A list like this:
10 2 100 1 25 3
sorted 0→9 becomes:
1 2 3 10 25 100
The Excel alternative, for comparison
If you're working directly in a spreadsheet, Excel's standard fix is Text to Columns: select the column, go to Data → Text to Columns, choose Delimited, uncheck all delimiters, and set the column format to General on the final step. This forces text-formatted numbers into real numeric values Excel can sort correctly. The VALUE() function in a helper column achieves the same thing without altering the original column.
Both work well if you're already in Excel and want the fix to live in the spreadsheet. Pasting into a numeric sort tool is faster when the list is a one-off - a set of IDs from a support ticket, a column copied out of a report - and you just need it sorted correctly right now, not converted as part of a permanent spreadsheet.
Mixed numeric and non-numeric lists
If your list has some purely numeric lines and some that aren't (labels, blanks, IDs with letters in them), the numeric sort still works predictably: numeric lines are sorted by value first, and any non-numeric lines are grouped afterward in alphabetical order rather than causing an error or getting dropped.
Decimals, negatives, and leading zeros
Decimal values (3.14) and negative numbers (-12) sort by their actual value the same as whole positive numbers. Leading zeros (007) are parsed by numeric value for sorting purposes - 007 sorts as 7 - though the zeros themselves stay in the text output; only the comparison uses the numeric value underneath.
Cleaning up other formatting issues too?
Data Cleaner handles currency symbols, inconsistent decimals, and messy nulls in one pass.