Sort Lines

Sort lines alphabetically, numerically or by length.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Paste a list and reorder it alphabetically, numerically, or by line length — ascending or descending. It is built for cleaning up word lists, CSV columns, log snippets, config keys, and any one-item-per-line data.

How it works

The text is split on line breaks into an array, then sorted by the mode you pick:

  • Alphabetical (A → Z / Z → A) uses localeCompare, your browser’s language-aware string comparison, so accents and non-Latin scripts order naturally. With case-insensitive enabled, both lines are lowercased before comparing, so Apple and apple group together.
  • Numeric (low → high / high → low) parses the leading number of each line. A line that does not begin with a number is treated as positive infinity, which pushes all non-numeric lines to the end.
  • Line length (short → long) compares the character count of each line.

The case-insensitive toggle only affects alphabetical sorting.

Example

Input lines: banana, apple, cherry, date

Alphabetical (A → Z) output:

apple
banana
cherry
date
ModeResult order
Alphabetical A→Zapple, banana, cherry, date
Alphabetical Z→Adate, cherry, banana, apple
Length (short→long)date, apple, banana, cherry

All sorting happens in your browser; nothing is uploaded.

Ad placeholder (rectangle)