Sort Text Alphabetically
Sort any list or text line by line: from A to Z, by length or randomly, in one click.
Lines: 0
What does sorting a text mean?
Sorting a text means rearranging its lines by a criterion: alphabetical order, the length of each line or a random order. The result is a structured list that is easy to scan.
A sort text tool automates that work: you paste the list, pick a mode and instantly get the sorted version, with nothing to rewrite by hand.
Everything happens in your browser, with nothing sent to a server. It is the fastest way to sort a list from any text document.
Why sort a list?
Sorting text is useful whenever you work with lists. These are the most frequent use cases.
Lists and directories
Sorting text alphabetically leaves a list of names, cities or products clean and easy to scan.
Data and references
Sorting a list of keywords, URLs or bibliographic references helps you find each entry at a glance.
Study and organization
Sorting a vocabulary or a syllabus alphabetically makes review easier, and random order helps create exercises.
To clean up repeats, see the remove duplicate lines tool, or read our blog post length guide.
How to sort a text step by step
Paste the text
Copy your list or text and paste it into the top box, with one item per line.
Choose the mode
Select sort A-Z, Z-A, by length or random, and set whether to ignore case or remove duplicates.
Copy the result
The sorted text appears instantly. Copy it or download it as a .txt file.
The sort modes explained
Alphabetical A-Z and Z-A
The A-Z mode sorts the lines from A to Z, the most common order for lists of names or words. The Z-A mode sorts them the other way, from Z to A.
By length
The by-length mode sorts the lines from the shortest to the longest. It is useful for spotting abnormally long or short entries in a data list.
Random
The random mode shuffles the lines at random. It works for raffles, mixing exam questions or quickly creating variations of a list.
Accents and locale-aware ordering
A naive sort places accented characters after the plain alphabet, which breaks multilingual lists. This tool uses locale-aware comparison instead.
That means accented vowels are sorted next to their base letter, and language-specific letters keep their proper place in the alphabet, just as a native speaker would expect.
Example: "café" sorts right next to "cafe" instead of being pushed to the end of the list.