Number Sorter
Sort numbers into ascending or descending numerical order. Handles negatives and decimals correctly, extracts numbers from messy pasted text, and can remove duplicates.
Whether you call it number sorter or numerical order, this free tool handles it instantly in your browser.
Options
Example usage
Example input
10, 9, 100, 2
Example output
2 9 10 100
Batch Processing
Enter multiple inputs, one per line. Each line will be processed separately.
Why this tool?
Everything runs right in your browser — no uploads, no sign-up, no waiting. Your text never leaves your device.
Quick tips
- •Outputs update live as you type.
- •Use the sticky copy button to grab results quickly.
- •Bookmark this page for fast access.
More like this
Discover related tools and step-by-step guides for this kind of task.
How it works
- Numbers are pulled out of whatever you paste — commas, spaces, line breaks, or text around them all work.
- Sorting is numerical, not alphabetical, so 100 comes after 9 rather than before it.
- Negatives and decimals are handled correctly: -10 sorts below -5, and 2.5 sits between 2 and 3.
- Optionally strip duplicates and choose how the result is separated.
Use cases
Why a text sort gets numbers wrong
Sorting text compares characters left to right, so "100" comes before "9" because the character "1" is lower than "9". Every spreadsheet column stored as text, every list sorted in a plain editor, and every naive script hits this, and the result looks almost right, which is what makes it dangerous — a list of 200 values with a handful out of order is easy to miss.
A number sorter parses each value first and compares the numbers, so 9 sorts before 10 and 100 comes last. This tool also extracts numbers from surrounding text, so you can paste a messy column straight out of a document without stripping labels and units first.
Negatives, decimals, and duplicates
Negative numbers are the second common trap. Sorted as text, -10 lands next to -1 and both end up in the wrong place. Sorted numerically, -10 correctly falls below -5, because it is further from zero in the negative direction. Decimals behave the same way: 2.5 sits between 2 and 3, not after 25.
The duplicate option is worth knowing about because it changes what the output means. Leaving it off preserves every value, so the output has the same length as the input and you can still count occurrences. Turning it on gives you the distinct set instead — useful when you are checking which IDs appear in a list rather than how often.
Cleanup
Explore all text cleanup tools
Browse every tool for this kind of task, along with helpful guides that show you how to get the most out of them.
Related tools
Supporting guides
Conversion History
Loading...
FAQ
How do you put numbers in numerical order?
Ascending order runs smallest to largest, descending runs largest to smallest. The key difference from alphabetical sorting is that 100 is larger than 9 even though it starts with a 1 — a plain text sort gets this wrong, which is why a dedicated number sorter is worth using.
Does it handle negative numbers and decimals?
Yes. Negatives sort below zero in the correct order (-10 before -5), and decimals sort by value, so 2.5 falls between 2 and 3.
Can I paste numbers mixed in with other text?
Yes. Every number in the input is extracted and everything else is ignored, so you can paste a messy list straight from a document or spreadsheet without cleaning it first.

