Sort List Alphabetically
Sort your text lines alphabetically with options to customize the order and case sensitivity.
Sort Order
Case Sensitivity
Empty Lines
How to use Sort List Alphabetically
- 1
Enter your list
Paste your items into the input box with one item on each line.
- 2
Set sorting options
Choose ascending A-to-Z or descending Z-to-A, pick case-sensitive or ignore-case, and decide whether to keep or remove empty lines.
- 3
Sort the list
Click Sort List to reorder every line according to your chosen options.
- 4
Copy the output
Copy the sorted list from the output box to use in your document or spreadsheet.
Sorting a List Alphabetically, Line by Line
Line-based sorting in plain terms
This tool treats every line as one item and reorders those lines alphabetically. Whatever sits on a single line, whether it is one word or a full phrase, travels together as a unit. Paste a column of names, tasks, tags, or values with one entry per line, click sort, and the lines come back in alphabetical order without rearranging anything inside a line.
That line-as-item model is what makes the tool reliable for real-world lists. A line like "Smith, John" stays intact and sorts under S, and a multi-word task like "Buy groceries" sorts under B. You never have to worry about words jumping between lines, which is the behavior you want when each row is a distinct record.
Case-sensitive vs. Ignore case
Capitalization affects the tie-breaking, not the basic alphabetical run. This tool compares with a locale-aware comparison, so letters sort in true dictionary order regardless of case — "apple" comes before "Zebra" whether Case Sensitivity is set to Ignore Case or Case-Sensitive, because the comparison weighs the base letter before the case. What the two modes change is how words that differ only in capitalization are ordered next to each other.
Ignore Case, the default, compares letters regardless of capitalization, so "apple," "Banana," and "Cherry" fall into natural A-to-Z order and "apple" and "Apple" rank as equals. Keep it on for any human-facing list; choose Case-Sensitive only when capitalization itself is meaningful, such as sorting code identifiers or data where casing carries information.
Keeping or removing empty lines
Pasted lists often arrive with blank rows between sections or trailing empty lines from a copy-paste. The Empty Lines setting puts you in control. Keep Empty Lines preserves those blanks, which is useful when the spacing is intentional and you want the structure maintained after sorting.
Remove Empty Lines strips every blank row before sorting, giving you a tight, gap-free list. This is the option to choose when the empty lines are just noise from an export or a messy paste, and it saves you from manually deleting blank rows afterward.
Numbers and digits in a text sort
Sorting is by text, so lines that start with digits are compared character by character rather than by numeric value. "10" sorts before "2" because the character "1" comes before "2." If your list is numbered and you need true numeric order, pad the numbers with leading zeros, for example "02" and "10," so the text order lines up with the numeric order.
This same rule means a line beginning with a symbol or a digit will generally sort ahead of one beginning with a letter, because those characters have lower codes. Knowing this lets you predict exactly where odd lines will land instead of being surprised by them.
Ascending and descending order
Ascending, A to Z, is the default and the right choice for glossaries, directories, and reference lists. Descending, Z to A, reverses the order and is handy when you want the tail end of the alphabet first, or simply need to flip an already-sorted list without retyping it.
The order applies after case and empty-line handling are resolved, so you can freely combine, for example, descending order with Ignore case and Remove empty lines to get a clean reverse-alphabetical list with no blank rows.
Everyday use cases
Line-based sorting is ideal for a spreadsheet column you copied out as text, a roster of names, a to-do list, a set of CSS class names, a list of file names, or any vertical list that needs ordering before you paste it back. Sort first, then paste the result into your document, spreadsheet, or code.
It is also a quick way to make two lists comparable: sort both with the same options and differences line up visually, making it easy to spot what is missing or extra between them.
How this differs from Alphabetical Order
Both tools alphabetize, but they are tuned for different inputs. This Sort List tool is purpose-built for clean, one-item-per-line lists and adds list controls you will not find elsewhere, especially the Keep or Remove Empty Lines option. Choose it when your data already lives one entry per line and blank-row handling matters.
The Alphabetical Order tool is the more flexible cousin: it can also sort the words inside a paragraph or the items inside a comma-delimited string, and it can remove duplicate lines. Reach for that one when your text is inline or delimited; reach for this one when you have a tidy vertical list to put in order.
Frequently asked questions
How does case sensitivity affect the sort order?
Can I sort in reverse alphabetical order?
What happens to blank lines in my list?
How are numbers and items starting with digits handled?
Is the tool free and does it upload my list?
Related tools
Keep going with these handy tools