Toolstia / Sort lines alphabetically
Sort lines of text
Paste a list and sort it the way you need. Sort alphabetically, by the number at the start of each line, by line length, reverse the order or shuffle it at random. Options let you ignore case and tidy the lines first.
How it works
- Paste your lines.
- Choose how to sort.
- Copy the sorted list.
Alphabet and natural order
Plain alphabetical order puts file10 before file2 because it compares one character at a time. Natural order reads the digits as numbers, so file2 comes before file10. Both follow your language's rules for accents.
Sorting by number
Each line is read for the number at its start, and commas like 1,000 are understood. Lines that do not begin with a number go to the end in their original order.
Descending, reverse and shuffle
Descending flips the chosen sort. Reverse simply flips the existing order without sorting. Shuffle puts lines in a random order and can be repeated.
Duplicates
Sorting keeps every line. To remove repeated lines too, use the remove duplicate lines tool.
Questions
Is the sort case sensitive?
By default it ignores case. Untick that option to treat capitals separately.
Does it sort Bangla?
Yes, using your browser's language rules.
How is a tie handled?
Lines that compare equal keep their original order.
Is anything uploaded?
No. Your text stays in your browser and is never sent anywhere.