Sort Lines
Sort lines of text in various orders instantly.
Sort Lines — FAQ
How does alphabetical sorting work?
+
Alphabetical sorting compares lines character by character using Unicode code point order. By default this is case-sensitive, so uppercase letters (A–Z, code points 65–90) sort before lowercase (a–z, code points 97–122). A case-insensitive sort option treats both as equivalent for ordering purposes.
What is the difference between alphabetical and numerical sorting?
+
Alphabetical sorting treats all characters as text, so '10' sorts before '9' because '1' comes before '9' as characters. Numerical sorting parses numbers and compares their numeric values, so '9' correctly sorts before '10'. Use numerical sort when your lines begin with numbers and you want them in mathematical order.
What does sorting by length do?
+
Sorting by length orders lines from shortest to longest (or longest to shortest) based on character count. Lines of equal length maintain their relative order (stable sort). This is useful for formatting code, creating word lists ordered by complexity, or finding the shortest/longest entries in a list.
What is a random shuffle and when would I use it?
+
Random shuffle randomizes the order of lines using the Fisher-Yates algorithm, producing an unpredictable output each time. It is useful for randomizing quiz questions, creating random sampling from a list, shuffling playlists, or assigning items randomly without bias.
Can I sort lines in reverse order?
+
Yes. All sort modes support a reverse option that applies after the primary sort, giving you Z-to-A alphabetical, longest-to-shortest, or largest-to-smallest numeric order. This makes it easy to find the highest values or last items in any sorted list.