Text Sorter
Sort lines alphabetically A–Z or Z–A with smart options
Put a list in alphabetical order
Sorting a list by hand is slow and error-prone once it goes past a dozen entries. Text Sorter treats each line as an item and reorders the whole list alphabetically, either ascending or descending. It suits names, keywords, file names, ingredients, product codes and anything else that lives one per line.
Sorting step by step
- Put one item per line in the Input Lines box. Paste from the clipboard, load a .txt file with File, or press Sample to try the tool with a set of animal names.
- Choose the direction with the radio buttons: A to Z or Z to A.
- Set the checkboxes: Case-insensitive (on by default), Trim lines (off by default) and Skip blank lines (on by default).
- Click Sort Lines.
- The summary confirms the number of lines and direction, and Before and After counts appear. Use Copy or .TXT (sorted-text.txt).
How the options affect the order
- Case-insensitive lowercases each line before comparing, so Banana and apple sort together rather than capitals being grouped separately. Without it the comparison follows your browser's locale rules.
- Trim lines removes leading and trailing spaces from every line, which prevents an entry with a stray space from jumping to the wrong position. The trimmed version is what appears in the output.
- Skip blank lines drops empty lines. If unticked, blank lines are kept and sort to the top in A to Z order.
Common uses
- Alphabetizing a bibliography, glossary or attendee list.
- Ordering keywords or tags before importing them.
- Sorting entries in a config or ignore file so changes are easy to review.
- Arranging a shopping or packing list.
Limitations
The comparison is alphabetical, not numeric, so lines starting with numbers sort as text: 10 comes before 2. If you need numeric order, pad the numbers with leading zeros first. The sort works on the whole line, so it cannot order by the second word or by a column. Z to A is produced by reversing the ascending result. Accented letters are placed according to the browser's locale rules. The sorting runs in your browser page and your input box is not altered, so you can flip the direction or change an option and sort the same list again without pasting it twice.
Related Tools
Related Tools