About this tool
Sort lines alphabetically, ascending or descending.
Sort Lines Tool reorders every line of pasted text alphabetically, A to Z or Z to A, using JavaScript's locale-aware string comparison so accented and non-English characters land where a dictionary would put them rather than where their byte values fall. It suits anyone tidying a list — keyword sets, CSV columns, import files, glossary entries — who wants the sorted result back in one paste-and-copy step. An ignore-case option is on by default, so Apple and apple sit together instead of all capitals being pushed to the top.
Open Sort Lines Tool on AltFTool — it loads instantly in your browser.
Paste your lines into the Input box, or press "Load sample" for the banana / apple / cherry / date list.
Set "Order" to "A → Z" or "Z → A" and leave "Ignore case" ticked so Apple and apple sort together.
The Result panel re-sorts as you type and drops blank lines; press "Copy" to take the sorted list.
Comparison uses localeCompare, so é sorts next to e and lowercase entries are not dumped after every uppercase one the way a raw ASCII sort would.
Ignore case is on by default for natural dictionary order, but turn it off and capitals sort separately — useful for case-sensitive identifiers.
Empty lines are filtered before sorting, so a list pasted from a PDF or email comes back without the run of gaps it arrived with.
Set Order to Z → A. The lines are sorted ascending first and then reversed, so descending output is the exact mirror of the ascending result, including how case folding was applied.
No. Every non-empty line you paste comes back, duplicates included — they simply end up adjacent once sorted, which makes them easy to spot or delete. Only blank lines are removed.
As text, not as numbers. That means 10 sorts before 2, because the comparison reads character by character. Pad numbers with leading zeros (02, 10) if you need true numeric order.
There is no fixed line cap — sorting runs in your browser on the text in the box, so the practical limit is your device's memory. Lists in the tens of thousands of lines sort effectively instantly on a typical laptop.