Text utility

Text Sorter

Sort one textarea line at a time in alphabetical or numeric order. Your text stays in your browser, and retained lines keep their original content.

Sort your text

Sort order
Text comparison options

Case sensitivity and surrounding-whitespace options apply only to A to Z and Z to A. Numeric sorting always parses each retained line after trimming it.

An empty line is any line whose trimmed text is empty. This option applies to every sort mode.

Input lines
0
Output lines
0

How to sort text

Sort newline-separated text locally in three steps.

  1. Paste or type one item per line in the input area.
  2. Choose an alphabetical or numeric order, then set any relevant comparison options.
  3. Select Sort lines, review the counts and sorted output, then copy the current result when ready.

Frequently asked questions

How does alphabetical sorting compare lines?
The tool compares JavaScript string keys with ordinary lexical less-than and greater-than operators, not locale-aware collation. Case sensitivity is off by default, so keys use toLowerCase() unless Case sensitive is selected. Ignore surrounding whitespace changes only the comparison key, never the raw output line.
Which values work in numeric modes?
Every retained line must be a finite signed integer or decimal after trimming, such as -2, 0, 12., .5, or +3.25. Empty values, a lone decimal point, exponent notation, NaN, Infinity, and malformed numbers are rejected, and no numeric output is produced.
What happens to identical values or trailing line breaks?
Lines with equal text keys or numeric values keep their original relative order through an explicit input-index tie-breaker. Any non-empty textarea value is split on line feeds, so a trailing line feed creates a final empty segment unless Remove empty lines is selected.

Remove repeated lines, change ASCII letter case, or count text alongside your sorted output.