#251 · Lists, Sorting & Lines Text Tool

Sort Lines by Number

Sort lines by the numbers they contain. Choose first, last, largest, or smallest detected number, then place lines in ascending or descending numeric order with clear parsing statistics.

Text Input

Numeric line sorting

Recent History

No history yet.
Ad space

How to use this text tool

  1. Paste or upload your text.
  2. Choose the processing mode and options.
  3. Run the tool, then copy or export the output.

What this tool does

This tool extracts numeric values from each line and sorts the full lines by those values rather than by plain alphabetical order.

Extract numbers with a numeric pattern, convert them to comparable values, sort by selected numeric target, and keep unresolved lines according to your option.

Numeric sort detects integers, decimals, negative values, and comma-formatted numbers when enabled.

Example

Input: Score 90 / Score 10 / Score 55. Output: Score 10 / Score 55 / Score 90 when using first number ascending.

Use cases

  • Sort grades or score lists
  • Organize price lists numerically
  • Reorder log lines with IDs or counts
  • Clean ranking data before exporting

Tips for better output

  • Use first number mode for score lists or ranked labels.
  • Use last number mode when IDs appear at the end of each line.
  • Move non-numeric lines to the bottom if you want to keep headers.

Processing details

Extract numbers with a numeric pattern, convert them to comparable values, sort by selected numeric target, and keep unresolved lines according to your option.

This browser-based tool processes text locally in your page. Very large files may depend on device memory and browser limits.

FAQ

How do I sort lines by numbers only?

Paste one item per line, choose the numeric extraction mode, and run the tool. The full line is sorted by the detected number.

Can I sort decimal and negative numbers?

Yes. Decimal values and negative values are parsed as numbers, so -2, 3.5, and 10 are sorted correctly.

How do I sort prices with commas?

Keep the comma number option enabled. Values like 1,250.50 are converted to numeric values before sorting.

What happens to lines without numbers?

You can move them to the top, move them to the bottom, or remove them from the final output.

Why is numeric sorting better than alphabetical sorting?

Alphabetical sorting may place 100 before 20. Numeric sorting compares actual number values instead.

Module table

ModulePurpose
Input parserSplits and prepares text according to selected options
ProcessorExtract numbers with a numeric pattern, convert them to comparable values, sort by selected numeric target, and keep unresolved lines according to your option.
StatisticsShows counts, changes, quality score, and export data
ExportCopy, TXT, CSV, JSON, and print actions

Browse more text tools

CallText category hubs