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
How to sort text
Sort newline-separated text locally in three steps.
- Paste or type one item per line in the input area.
- Choose an alphabetical or numeric order, then set any relevant comparison options.
- 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.
Related text tools
Remove repeated lines, change ASCII letter case, or count text alongside your sorted output.