Sort Text Lines

Alphabetize lines A→Z, Z→A, or by length.

Quick answer: Alphabetize lists online instantly. Sort text lines A-Z, reverse alphabetical, or by string length. Fast and free tool.

transformed locally — nothing leaves your browser

Sort a list of lines alphabetically in either direction, or by line length — handy for tidying lists, imports, and references.

How it works

  1. Paste your unsorted list into the editor.
  2. Select your sorting method (A to Z, Z to A, or Length).
  3. Copy the perfectly ordered list.

Frequently asked questions

Is the sort case-sensitive?

It uses locale comparison, which generally groups upper and lower case of the same letter together.

Can I sort numbers?

Lines sort as text, so numeric lists may order lexically (10 before 2). For pure numbers, the length sort can help.

Are blank lines kept?

No — empty lines are dropped so the sorted output is clean.

More in Text Tools