Sort Lines
Alphabetize a block of text ascending or descending, with optional de-duplication.
Sort any list alphabetically
This tool puts the lines in your text into alphabetical order. Use it to alphabetize a scrambled list of names, tidy a set of tags or keywords, or line up data before a comparison. Sorting is not case-sensitive by default, so capital letters do not jump to the top.
Sort ascending, descending or with duplicates removed
Choose A to Z or Z to A for the direction you want. Turn on case-sensitive sorting if you need strict character order, which some code and data tasks require. There is also an option to remove duplicate lines in the same pass, so you do not have to run two separate tools.
How to sort lines online
Paste your lines with one item per line, click Sort A to Z or Sort Z to A, and copy the result. Toggle the options and sort again if you want a different order.
Frequently asked questions
How does it sort numbers?
Lines are sorted as text, so 10 comes before 2. That is how most plain-text sorting behaves, since it compares character by character.
What happens to blank lines?
Empty lines sort to the top because they contain no characters. Run the blank line remover first if you want them gone.