Text Sorter
Paste a list of lines and sort them alphabetically, in reverse, by length, or randomly. You can also remove duplicates, strip empty lines, and ignore case. Works for anything you'd put in a text file - names, keywords, URLs.
How to use
- Paste your list into the input. Each line is treated as a separate item.
- Choose your sort order: A to Z, Z to A, shortest to longest, or random shuffle.
- Use the options to ignore case, remove duplicates, or strip empty lines.
- Sorted output appears right away. Copy it all with one click.
Related tools:
Sorting a list of words, names, URLs, or items alphabetically by hand is slow and error-prone for anything beyond a handful of items. Paste the list (one item per line) and choose the sort order: A to Z, Z to A, shortest to longest line, longest to shortest, or a random shuffle.
This comes up in data preparation more than expected: alphabetising a list of countries for a dropdown, sorting error log entries, ordering items in a bibliography, or randomising a list of names for a draw. The case-insensitive option prevents 'banana' sorting below 'Zebra' just because of capitalisation.
Frequently Asked Questions
Does it sort numbers correctly?
Alphabetical sorting treats numbers as text, so 10 sorts before 2 because '1' comes before '2'. For numerical sorting, use a spreadsheet. The text sorter is designed for word and line alphabetisation, not numerical ordering.
Can I sort a list with commas instead of line breaks?
Not directly - the tool sorts line by line. Paste your comma-separated list and replace commas with line breaks first (Ctrl+H in most text editors), sort, then rejoin if needed.
What does sorting by length do?
Lines are sorted from shortest to longest character count (or longest to shortest). Useful for formatting - seeing shortest items first can help identify outliers or clean up a variable-length list.