/›content-cleanup›sort-lines
Content Cleanup

Sort Lines Online: Alphabetically, by Length, Reverse or Shuffle

Sort any pasted list alphabetically, in reverse, by line length, or shuffle it randomly. Runs instantly in your browser.

Runs in your browser — your text is never uploaded or stored.

Quick answer

To sort lines by length, paste your list and choose 'By length' — the shortest lines come first and equal-length lines keep their original order. A–Z and Z–A modes alphabetize the list instead.

  • Cost: free, no signup or limits.
  • Privacy: runs 100% in your browser; text is never uploaded.
  • Works on: desktop and mobile browsers, offline once loaded.
  • Category: Content Cleanup.
Output

Common conversions

How to Use

  1. 1.Paste the lines you want to sort into the input.
  2. 2.Choose a mode: A–Z, Z–A, by length or shuffle.
  3. 3.Copy the sorted list from the output.

When sorting by length helps

Sorting lines by length is useful for spotting outliers in keyword lists, tidying CSS or import statements into a neat 'pyramid', and finding the shortest or longest product names, titles or domains.

Alphabetical sorting that feels natural

Alphabetical mode uses locale-aware comparison, so 'apple' and 'Apple' sit together and accented letters sort where readers expect them.

Advertisement

FAQ

Is the sort case-sensitive?

It uses locale-aware comparison, so uppercase and lowercase sort together naturally.

How does 'by length' sort ties?

Lines of equal length keep their original relative order (stable sort).

Can I reverse the sort?

Yes — pick Z–A for reverse alphabetical order.

Related tools

More text utilities