How to use the sort text lines
- 1Paste your list into List to sort (one item per line).
- 2Choose an Order, such as A → Z (alphabetical) or Natural: 2 before 10.
- 3Tick Remove duplicates or Sort by the last word (surnames) if you need them.
- 4Copy the result from Sorted list.
Example
file10.txt file2.txt File1.txt file1.txt
file1.txt File1.txt file2.txt file10.txt
Setting: Natural: 2 before 10. With A → Z the order is file1.txt, File1.txt, file10.txt, file2.txt, because text is compared one character at a time and “1” comes before “2”.
Alphabetical and reverse order
A → Z sorts the way a dictionary does: capital and small letters sort together, and accented letters sit next to their plain letters (é with e). When two lines differ only in case, the lowercase one comes first. Z → A is the exact reverse.
Tick Case-sensitive (capitals first) to sort by character code instead, the way many programming languages do: all capitals come before all lowercase letters, so “Zebra” sorts before “apple”.
Natural sort for numbers
Normal alphabetical sorting compares text character by character, so “10” comes before “2” (because “1” is less than “2”). Natural: 2 before 10 reads runs of digits as whole numbers: file2 before file10, Chapter 9 before Chapter 11. Use it for file names, version numbers, chapter lists and anything numbered. Natural, reversed gives the opposite order.
Sorting by length
Shortest line first and Longest line first order lines by the number of visible characters, counting an emoji or accented letter as one. Lines of equal length are sorted alphabetically. Sorting by length helps when writing headlines and taglines, or when checking a keyword list for overly long phrases.
Ignoring case
Case is ignored by default for ordering and for Remove duplicates, so “Apple” and “apple” count as the same item and the first one is kept. With Case-sensitive (capitals first) ticked, they count as different. Remove empty lines (on by default) drops blank lines before sorting so they don't collect at the top.
Random shuffle
Random shuffle puts the lines in random order using your browser's cryptographically secure random generator and the Fisher–Yates method, so every order is equally likely. The list is shuffled again each time you edit it or change an option. To pick one or more winners from a list instead, use the random line picker. Reverse the current order flips the list upside down without sorting.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
