Skip to content
TextArray
100% local

Sort numbers

Sort a list of numbers by numeric value, so 2 comes before 10, not after it.

Input
Output

Sort numbers

Paste a column of numbers and this tool orders them by their actual value. That is the difference from a plain line sort: a text sort compares character by character and puts 10 before 2, because "1" comes before "2". Numeric sorting reads each line as a number, so 2, 4, 10 and 33 land in the order you expect. It works for whole numbers, decimals, negative values and scientific notation like 1e3.

Choose ascending or descending order, and optionally switch on "Remove duplicate values" to drop repeats. Duplicates are matched by value, not by text, so 1, 1.0 and 01 count as the same number and only the first is kept. The original text of every line is preserved — a value written as 2.50 stays 2.50, nothing is reformatted or rounded.

Lines that are not numbers are left untouched. They keep their original order and are moved to the end of the output, below the sorted numbers, so a stray label or blank line never breaks the sort. This makes it safe to paste mixed content and still get a clean numeric list at the top.

Everything runs in your browser. The numbers are never uploaded, which matters for measurements, prices, IDs or any figures you would rather keep private. The tally under the output shows how many numbers were sorted and the total line count, and the result updates as you type. Windows (CRLF) and Unix (LF) line endings are both accepted.

FAQ

How is this different from sorting lines alphabetically?
An alphabetical sort compares text character by character, so 10 comes before 2. This tool reads each line as a number and sorts by value, so 2 comes before 10, just as you would order them by hand.
What happens to lines that are not numbers?
They are kept exactly as written, left in their original order and moved to the end of the output below the sorted numbers. Blank lines and labels never disturb the numeric sort.
Does it handle decimals and negative numbers?
Yes. Decimals, negative values and scientific notation such as 1e3 are all sorted by their real value, and the original text of each line is preserved.
How does "Remove duplicate values" decide what is a duplicate?
By numeric value, not by text. So 1, 1.0 and 01 are treated as the same number and only the first occurrence is kept.
Are my numbers uploaded anywhere?
No. The tool runs entirely in your browser and your numbers never leave your device.