Alphabetical Sort

Sort lines of text in any order — alphabetical, by length, reversed, or shuffled.

How to Use

  1. Type or paste your list into the input box — put each item on its own line.
  2. Choose a sort order from the dropdown: alphabetical, by length, reverse, or random shuffle.
  3. Set your preferences for case sensitivity, empty lines, and whitespace.
  4. Click Sort and copy the result.

Case-sensitive sort places uppercase letters before lowercase (e.g., "Banana" before "apple"). When unchecked, sorting ignores case.

About this Alphabetical Sort Tool

Sorting a list of names, keywords, or entries alphabetically is trivial for a handful of items but tedious and error-prone once a list grows past a screen's worth of lines, especially when re-sorting after edits.

How computers actually sort text

Text sorting compares characters based on their underlying character code, not their visual appearance. In standard ASCII-based sorting, uppercase letters (A–Z) sort before lowercase letters (a–z), and numbers sort before letters. This is why a naive sort can put "Zebra" before "apple" — the capital Z has a lower character code than lowercase a. Case-insensitive sorting fixes this by comparing lowercase versions of each line.

Numbers inside text

Standard alphabetical sorting treats numbers as characters, not values, so "Item 10" sorts before "Item 2" — because "1" comes before "2" as a character, regardless of the full number's value. Natural sorting (sometimes called "natural order") instead compares the numeric value, correctly placing "Item 2" before "Item 10". Which one you want depends on whether the list is purely textual or contains meaningful sequential numbers.

Common uses

  • Alphabetizing a contact list, roster, or directory before printing or sharing
  • Organizing a keyword or tag list for easier scanning
  • Sorting a bibliography or reference list into standard order