Paste one item per line, then click Sort A-Z or Sort Z-A; the reordered list appears in the output box, ready to copy.
- Type or paste your list into the input box, keeping one item on each line.
- Click Sort A-Z to order the lines ascending, or Sort Z-A to order them descending.
- Copy the sorted list from the output box below. Your original text stays in the input box, so you can click the other button any time to flip the order.
Sort Text Lines
Sort the lines of a text block alphabetically, right in your browser. Paste your list with one item on each line, then click Sort A-Z for ascending order or Sort Z-A for descending order; the reordered list appears in the output box below, ready to copy.
Because each line is treated as one item, this is the quickest way to alphabetize a list of names or email addresses, tidy a set of tags, keywords, or CSS classes, or order the lines of a config or word list before you run a diff so the two sides line up. Sorting uses the browser's built-in locale-aware comparison, so upper- and lower-case versions of the same word land next to each other.
One thing to know: lines are compared as text, not as numbers, so "10" and "100" sort before "2". For a list of plain numbers, pad them to the same width (02, 10, 100) to get the numeric order you expect. Your original text stays in the input box after a sort, so you can flip between Sort A-Z and Sort Z-A as often as you like.
Sorting runs entirely in this browser tab using plain JavaScript - nothing you type or paste is uploaded, sent to a server, or saved. Refreshing or leaving the page clears the box; there is no history and no account.
For other quick text jobs, see the word counter or the JSON parser, both of which run the same way - fully in your browser, with nothing uploaded. A step-by-step walkthrough lives in the Sort Text Lines guide.
FreetoolOnline Editorial TeamFrequently Asked Questions
What does Sort Text Lines do?
It reorders a block of text one line at a time. Paste your list with one item per line and click Sort A-Z for ascending order or Sort Z-A for descending order; the sorted list appears in the output box.
When should I reach for it?
Use it to alphabetize a list of names or email addresses, tidy a set of tags, keywords, or CSS classes, or order the lines of a config or word list before you run a diff.
Why did "10" sort before "2"?
Lines are compared as text, character by character, not as numbers, so "10" comes before "2" because "1" comes before "2". To sort plain numbers in numeric order, pad them to the same number of digits first (02, 10, 100).
Is my text uploaded or saved anywhere?
No. Sorting runs entirely in your browser using plain JavaScript. Nothing you type or paste is uploaded or sent to a server, and nothing is saved - refreshing or leaving the page clears the box.