Text Sorter

Paste a list of lines and sort them alphabetically, in reverse, by length, or randomly — instantly.

What does this tool do?

The Text Sorter takes any list of lines and reorders them based on your chosen criteria. Each line in the input is treated as one item. You can sort alphabetically A to Z, reverse Z to A, by line length (shortest or longest first), or shuffle into a random order.

Common use cases

Sorting a list of names for a document, alphabetising a glossary, ordering CSS class names, sorting import statements in code, randomising quiz questions, or ranking items in a to-do list by length. Any situation where you have a line-separated list that needs ordering.

Case-insensitive sorting

The alphabetical sort is case-insensitive — "apple", "Apple", and "APPLE" are all treated the same, so uppercase items won't sort ahead of lowercase ones. This matches natural human expectations for sorted lists.

Sorting vs deduplication

The Text Sorter reorders lines but does not remove duplicates. If you want to remove duplicate lines as well, use the Duplicate Line Remover tool. For the best result with a clean, sorted, unique list, run through the Duplicate Line Remover first and then sort here.