Sort Lines Alphabetically

Paste a list and sort it A–Z, Z–A, by number, by line length, or shuffle it into random order.

Free · Runs in your browser · Your text is never uploaded

Lines in random order sorted into alphabetical order from A to Z

Sort options explained

  • A to Z / Z to A: alphabetical using your browser’s language-aware collation, so accented letters sort sensibly.
  • Numbers: sorts by the first number found in each line, so “Item 10” follows “Item 2”. Lines without a number go last.
  • Natural order: keeps numbers inside text in human order (file2 before file10).
  • Shuffle: a random order each time you press the button, useful for drawing names or randomizing a playlist.

Popular sort lines presets

Frequently asked questions

How do I sort a list alphabetically?

Paste the list, choose “A to Z” and copy the result. Capitalization is ignored by default so “apple” and “Banana” sort naturally.

How do I sort numbers correctly?

Choose “Numbers, low to high”. Plain alphabetical sorting puts 10 before 2, but numeric sorting compares the values.

Is the shuffle truly random?

It uses a standard Fisher–Yates shuffle with your browser’s cryptographic random generator.

Can I sort by line length?

Yes, choose shortest first or longest first.