Number Sorter
Sort a list of numbers ascending or descending, with optional deduplication. Instant, private, no sign-up.
How to sort a list of numbers online
Paste any list of numbers — one per line, comma-separated, or a mix of both — and this tool sorts them numerically, not alphabetically (so 2 correctly comes before 10, unlike a plain text sort). Choose ascending (smallest first) or descending (largest first) order, optionally remove duplicate values, and pick whether the output is newline- or comma-separated. Negative numbers and decimals are supported. Non-numeric entries are automatically skipped and flagged. Everything runs locally in your browser — nothing is uploaded. For more numeric utilities, try Average Calculator or Text Sorter.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Sorting a pasted list of numbers numerically rather than as text.
- Deduplicating numeric values that differ only in formatting, such as 1.50 and 1.5.
- Finding the largest and smallest values quickly.
- Ordering a list before computing a median by hand.
- Ordering a list before reading off a median or a quartile by hand.
Frequently Asked Questions
- Why do I need a numeric sorter when my editor can sort lines?
- Because a text sort is lexicographic and compares character by character, so 10 lands before 2 — '1' precedes '2'. It also puts 9 after 100. This tool converts each token to a number first and compares magnitudes, which is the ordering you actually meant when the lines happen to be numbers.
- What separators does the input accept?
- Newlines and commas, in any mix — a list copied from a spreadsheet column and one copied from a CSV cell both work without reformatting. Tokens are trimmed, so trailing spaces after a comma are harmless, and empty entries between consecutive separators are dropped rather than becoming zeros.
- What happens to entries that are not numbers?
- They are skipped and counted, and the count is displayed. That is deliberate: silently dropping them would hide a mangled paste, and coercing them to 0 would corrupt the minimum and the mean. Seeing 'skipped 3' tells you your data had a header row or a stray unit suffix in it.
- Does removing duplicates compare the text or the value?
- The value, after parsing. So 5, 5.0 and 05 collapse to a single entry — they are the same number written three ways. If you need to preserve the original spellings, sort without deduplication and remove duplicates in a text tool instead, where identity is by characters.
- Are negatives and decimals handled?
- Yes, both, and they sort by true magnitude: −10 comes before −2, which is the opposite of what a text sort produces. Scientific notation like 1e3 parses as 1000. Values beyond 2⁵³ lose exactness, since parsing goes through a double-precision number like everything else in a browser.
Common errors and gotchas
- Pasting values with thousand separators, which stop parsing as numbers at all.
- Losing a negative sign if the input was parsed loosely.
- Assuming decimals sort correctly when the locale uses a comma as the decimal mark.
- Deduplicating values that differ only in trailing zeros, which are numerically equal.
- Sorting a column that was paired with another, which breaks the correspondence.