Category: Text tools

Sort Lines

Sort a list alphabetically, numerically or by length

Sort any list of lines A–Z, by numeric value or by line length, in ascending or descending order. Empty lines are removed.

Sorted lines
10
2
apple
banana
cherry

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Alphabetical sorting uses your browser's locale-aware comparison, so accented letters and non-Latin scripts are ordered the way readers of that language expect. Numeric mode compares values rather than text, so 10 comes after 9 instead of before it.

How to use it

  1. Paste your list, one item per line.
  2. Choose A–Z, Numeric or Line length, and optionally reverse the order.
  3. Copy the sorted list.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Why is my numeric list sorted oddly in A–Z mode?
Alphabetical order compares text, so "10" sorts before "9". Switch to Numeric mode to compare the values.
What happens to blank lines?
They are removed so the sorted output stays compact.