About the Number Sorter
Spreadsheets and text editors sort as text, which is why a naive sort puts 100 before 9 and buries -5 at the end. This page parses each entry as a number first and orders by value, so signed numbers, decimals and scientific notation such as 1.2e3 all land where they belong. The original text of each entry is kept, so a value written as 007 comes back as 007 rather than 7.
The splitter is deliberately loose. New lines, commas, semicolons, pipes, tabs and runs of spaces all count as separators, so a column copied out of a spreadsheet, a comma list pasted from a config file and a paragraph of space separated readings can be mixed in the same input. Choose the output separator independently, which turns this page into a quick reformatter as well as a sorter.
Beyond plain ascending and descending there is a sort by absolute value, useful for ranking deviations where the sign is noise, and a shuffle that reorders the list randomly. Remove duplicates keeps the first occurrence of each value. Add summary appends the count, minimum, maximum, sum, mean and median under the list. An entry that is not a number stops the run with the offending token quoted unless Ignore non-numeric is on. For sorting words rather than values, use Sort Text Lines, and to pull numbers out of surrounding prose first try Extract Numbers.
How to use
- Paste your numbers into the left pane in any separator style.
- Pick an Order, then a Separator for the output.
- Tick Remove duplicates or Add summary if you need them.
- Copy the sorted list or download it as a text file.
Common questions
- Why did my spreadsheet sort 100 before 9?
- It compared the values as text, character by character, where 1 sorts before 9. This page compares numeric value instead.
- Can it sort decimals and negatives together?
- Yes. Signs, decimal points and exponents are all parsed, so -13, 0.5 and 1.2e3 sort correctly in one list.
- What counts as a separator?
- New lines, commas, semicolons, pipes, tabs and spaces, in any mixture. Empty entries are skipped.
- Does the median in the summary handle even counts?
- Yes. With an even number of values it averages the two middle entries.