Numerical Line Sorter
Paste lines of text containing numbers and sort them numerically — ascending or descending — in one click.
Use the Numerical Line Sorter
Options
Sort Order
Non-numeric Lines
How Numbers Are Detected
10. Apple
→ key: 10
Price: $3.99
→ key: 3.99
-5 degrees C
→ key: -5
Header row
→ no number, pushed to top/bottom
Summary
Numerical Line Sorter detects the first number in each line and uses it as the sort key, so lines like "10. Apple", "2. Banana", "7. Cherry" sort in true numeric order rather than alphabetical (which would place 10 before 2). It handles integers, decimals, and negative values. Lines with no detectable number can be sent to the top or bottom of the output.
How it works
- Paste or type your lines into the input box.
- Choose Ascending or Descending sort order.
- Decide whether non-numeric lines go to the top or bottom.
- Click "Sort Lines" to run the sort instantly.
- Review the sorted output and click "Copy Output" to copy it.
Use cases
- Sort a numbered list that got scrambled during editing.
- Reorder log entries by a leading error code or timestamp number.
- Sort ranked items such as "1st place", "2nd place" correctly.
- Reorder CSV rows where the first column is a numeric ID.
- Sort product names that include version or model numbers.
- Organize financial line items by amount.
- Reorder student scores or grades listed one per line.
- Sort filenames that include sequence numbers.
Frequently Asked Questions
Last updated: 2026-05-23 · Reviewed by Nham Vu