About Sort Lines Alphabetically
This tool sorts one item per line inside your browser. You paste or type text, choose a mode, and the tool returns the reordered lines you can copy with one click. People who tidy lists, manage small CSVs, prepare wordlists, or clean data use it. The tool runs client-side, so nothing you type is uploaded after the page finishes loading. On modern browsers the sort follows your browser locale settings and will use the Intl.Collator API when available, so accented letters and punctuation follow local collation rules. Modes include alphabetic A to Z and Z to A, natural numeric order, shortest or longest first, reverse order, and an A to Z mode that removes duplicates. Use a quick trim and remove-empty-lines pass first for the cleanest results.
How to use it
- 1Paste one item per line into the input box.
- 2Choose a sort mode: A to Z, Z to A, Natural, Shortest, Longest, Reverse, or A to Z without duplicates.
- 3Click Sort to generate the output.
- 4Click Copy to put the sorted text on your clipboard.
Worked example
Input: item10 apple item2 apple banana Mode: Natural order Output: apple apple banana item2 item10
How it works
Text tool that runs in the browserOptions: A to Z, Z to A, Natural order (2 before 10), Shortest first, Longest first, Reverse the order, A to Z without duplicatesOne click copies the outputNothing typed is uploadedSource: MDN Web Docs: Intl.CollatorUnicode Collation Algorithm (UCA)ECMAScript Internationalization API (ECMA-402). Last checked 6 November 2026.
What it is good for
- Runs entirely in your browser so text stays local.
- Includes natural numeric order so 2 sorts before 10.
- One click copies the output to your clipboard.
- Sorting follows your browser locale; there is no manual locale selector.
- No column-based key sorting for multi-column CSV files.
Questions people ask
Will my text be uploaded to a server?
No. The tool runs client-side in your browser and does not upload text after the page loads. If your browser supports it, sorting uses local collation APIs.
What does Natural order mean?
Natural order compares runs of digits by numeric value so 2 comes before 10. Use Natural when lists include numbered items like item2 and item10.
How do I remove duplicate lines?
Use the A to Z without duplicates mode to sort and remove duplicates. If you want to keep original order while deduping, use a separate dedupe tool.
How are accented letters sorted?
Sorting follows your browser's locale rules, which come from Unicode CLDR. Results can differ across locales for accented characters.
Can I sort by a column inside CSV lines?
No. This tool sorts whole lines only. For column-based sorting, split columns first or use a spreadsheet or a dedicated CSV sorter.
Does the tool ignore case when sorting?
Behavior depends on your browser's collation. Many browsers treat case so that capital and lower-case letters order in a human-friendly way. If case matters, normalize case before sorting.
Help keep every tool free
FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.