Text Sorter
Sort a list of lines alphabetically, by number, by length, or put them in random order. Paste your lines and press Sort.
Your text is sorted in your browser and is never sent to a server.
How to sort text online
Paste your list with one item on each line, choose a sort order and press "Sort lines". The sorted list appears in the lower box, ready to copy or download. You can sort from A to Z or Z to A, by number, by line length, in natural order, in reverse, or in random order.
Which sort order should I use?
Use A to Z for names, words and keywords. Use natural order when your lines contain numbers, such as file1, file2 and file10, because a plain alphabetical sort puts file10 before file2. Use by number to order lines by the first number each one contains, for example prices or scores. Lines without a number go to the end. By length is useful for finding the shortest or longest entries, and random order shuffles a list for draws, quizzes and fair turns.
Extra options
"Ignore upper and lower case" stops capital letters from changing the order. "Trim spaces" removes spaces at the start and end of each line. "Remove empty lines" deletes blank lines, and "Remove duplicates" keeps only the first copy of each line, so you can sort and clean a list in one step. For more control over repeated lines, use the remove duplicate lines tool.
Questions about the text sorter
Does it sort Urdu text? Yes. It uses your browser's language rules to compare letters, so Urdu, Arabic and other scripts are sorted sensibly. The exact order can depend on your browser and device language.
Is the random order really random? It uses your browser's secure random number generator, so every order is equally likely.
Is my list stored anywhere? No. Sorting happens on your device and the list is never uploaded.
Related tools
- Remove Duplicate Lines – Delete Repeated Lines from a List
- Case Converter – UPPERCASE, lowercase, Title Case and More
- Text Diff – Compare Two Texts and See the Differences
- Word Counter
Learn more in our guide: Free Text Tools and QR Code Generators: A Complete Guide to 9 Handy Tools.