Clean
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.
Sorted Result
Your sorted list will appear here.
Five Sort Modes
A → Z: Ascending alphabetical order
Z → A: Descending alphabetical order
Shortest First: Lines ordered from fewest to most characters
Longest First: Lines ordered from most to fewest characters
Shuffle: Random order using Fisher-Yates algorithm
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.
Frequently Asked Questions
How do I sort a list alphabetically online?
Paste your list into the Line Sorter with one item per line, then click "A → Z." The tool instantly reorders every line from A to Z and displays the sorted result, ready to copy.
Can I sort lines by length?
Yes. The Line Sorter includes a sort-by-length option that arranges lines from shortest to longest (or longest to shortest). This is useful for formatting tables, aligning visual layouts, or understanding the range of your data.
Does the sort work on numbers?
The default alphabetical sort treats lines as strings, so numbers sort lexicographically (1, 10, 2). For correct numeric sort, ensure your numbers are zero-padded to the same digit length before sorting (e.g., 01, 02, 10).
Can I randomize the order of my lines?
Yes. The "Shuffle" option randomizes the order of all lines using a Fisher-Yates algorithm. This is useful for creating randomized lists, quiz questions, or shuffling flashcard data.
Related Tools
Discover all five sort modes and real-world applications for organized lists.
Read the full guide →