Line Sorter
Sort any list of lines alphabetically (A–Z or Z–A), by length, or randomly in seconds. Free, browser-based, no data sent to servers.
Five Sort Modes
Common Use Cases
- Sorting glossary terms, bibliographies, or reference lists alphabetically.
- Organizing config file keys for easier navigation.
- Preparing quiz questions or flashcard sets in random order.
- Sorting email addresses, domain names, or URL lists for deduplication.
How to Use the Line Sorter
Paste your list with one item per line and click one of the five buttons: A → Z, Z → A, Shortest First, Longest First or Shuffle. The reordered list appears below and can be copied with one click. You can click a different button to re-sort the same input.
A Worked Example
Take this list of seven lines: banana, Apple, cherry, apple, 10, 9, 2.
Two things are worth noticing. First, the sort ignores capitalization, so "Apple" and "apple" sit side by side and keep the order they had in your input. Second, the numbers are sorted as text, character by character, so "10" comes before "2" and "9".
How Each Mode Behaves
- A → Z and Z → A use your browser's language-aware comparison, so accented letters are placed sensibly. Blank lines sort to the top in A → Z order, so remove them first if you do not want them.
- Shortest First and Longest First compare the number of characters on each line, including spaces. Lines of equal length stay in their original relative order.
- Shuffle produces a different random order each time you click it.
Sorting Numbers Correctly
The sort has no numeric mode, so a list of numbers will come out as 1, 10, 2. To get 1, 2, 10, pad the numbers with leading zeros to the same length first (01, 02, 10). The same approach works for dates written as year-month-day, which sort correctly as text.
Common Uses
- Alphabetizing a bibliography, glossary, guest list or set of keywords.
- Ordering CSS classes, imports or configuration entries so that changes are easy to compare.
- Shuffling quiz questions, flashcards or a list of names for a random draw.
- Sorting first, then using the Duplicate Highlighter, makes repeated entries easy to spot by eye.
Frequently Asked Questions
Related Tools
Discover all five sort modes and real-world applications for organized lists.
Read the full guide →