Sort Lines Alphabetically
Sort a list of lines A to Z, Z to A, by length or in random order.
About this tool
Sorting a list by hand is slow and easy to get wrong. This tool puts your lines in order in one click. Paste a list with one item per line and choose how to sort it.
The five modes
A to Z sorts alphabetically using your browser's language rules, so accented letters sort in a sensible place. Z to A reverses that. By length puts the shortest lines first. Numbers sorts by the number at the start of each line, so 2 comes before 10, which a plain alphabetical sort gets wrong. Shuffle puts the lines in a random order.
Alphabetical order and case
The alphabetical sort uses locale comparison, which treats "apple" and "Apple" as close neighbors instead of putting all capital letters first. Items that start with a space, a symbol or a digit sort before letters.
Why numbers need their own mode
In an alphabetical sort the text is compared one character at a time, so "10" comes before "2" because "1" comes before "2". The numbers mode reads the leading number as a value instead. Lines that do not start with a number are placed together at the end or the start, so clean those first.
Shuffle
The shuffle uses the browser's secure random source and a standard method that gives every order the same chance. Use it for picking a speaking order, mixing quiz questions or randomizing a playlist.
Common uses
Alphabetize a list of names, references or keywords. Sort a to-do list by length to find the shortest tasks. Order items by price when each line starts with the price. Prepare a clean list before removing duplicates with our duplicate line remover.
Tips
Remove empty lines first, since each blank line counts as an item and sorts to the top. Keep a copy of the original order if you may want to go back.
Privacy
Sorting is done in your browser. Your list is not uploaded.
Frequently asked questions
Is the sort lines alphabetically free to use?
Yes. The sort lines alphabetically on QuickKit is free, needs no signup and has no usage limit.
Is my data safe when I use the sort lines alphabetically?
Yes. The sort lines alphabetically runs in your browser. What you enter is processed on your device and is not uploaded to a server.
Does the sort lines alphabetically work on a phone?
Yes. The page is built to work on phones, tablets and desktop browsers without installing anything.