Sort Lines Alphabetically
Sort lines alphabetically online A to Z in one click — tidy up lists, names and data instantly. Use the free Sort Lines Alphabetically below — enter your values and get instant results, right in your browser. Logic: the text is split on line breaks and lines are compared case-insensitively from A to Z (numbers sort before letters in standard Unicode order). Empty lines are kept in place at their sorted position.
How to use the Sort Lines Alphabetically
Long lists of names, cities, products or keywords are much easier to scan when they are in alphabetical order, but sorting them by hand in a notes app is tedious and error-prone. This tool sorts lines alphabetically online in a single click, putting every line from A to Z while keeping your original text untouched in the input box. It is perfect for cleaning class lists, inventory names, keyword lists and any data you copied from a spreadsheet.
- Paste your list into the input box, with one item per line.
- Click the Sort A-Z button in the operations row.
- Your alphabetized list appears instantly in the output box.
- Optionally click Remove Duplicate Lines first if the list has repeats.
- Click Copy to grab the sorted list for your document or spreadsheet.
Formula
Worked example
Frequently asked questions
No. Sorting compares letters without regard to case, so "apple" comes before "Banana" as you would expect in a dictionary.
This tool sorts A to Z. For a reverse list, sort A to Z first, then reverse the order manually or paste into a spreadsheet to flip it.
Blank lines are preserved. Use the Remove Extra Spaces or line-cleaning options if you want to tidy them up.