Sorting lines alphabetically online is one of those tasks that seems trivial until you have a 500-item list and no spreadsheet open. Our free line sorter tool handles ascending (A-Z) and descending (Z-A) sorts in one click, with options to ignore capitalization and strip blank lines.
What is Line Sorting?
Line sorting rearranges each line of a multi-line text into a specified order. The most common sort orders are:
- Alphabetical ascending (A-Z) - lines starting with "A" appear before lines starting with "Z". This is the default natural order for lists of names, words, or items.
- Alphabetical descending (Z-A) - the reverse of ascending order.
- Numerical - if lines contain numbers, sort by numeric value rather than lexicographic order. (Lexicographic order would put "10" before "9" because "1" < "9".)
Case sensitivity matters: by default, uppercase letters sort before lowercase in ASCII order ("Z" before "a"). A case-insensitive sort treats "apple" and "Apple" as equivalent.
How to Use the Line Sorter
- Paste your list - type or paste the text you want to sort into the input field, with one item per line.
- Choose your options - select ascending (A-Z) or descending (Z-A) order. Optionally enable case-insensitive sorting and toggle removal of blank lines.
- Copy the sorted result - the sorted list appears immediately in the output area. Click "Copy" to grab it.
Common Use Cases
- Alphabetizing a list of names for a directory, roster, or bibliography
- Sorting domain names, email addresses, or URLs for deduplication
- Organizing keyword lists for SEO research into a consistent order
- Sorting CSS properties alphabetically for consistent code style
- Preparing a list for display in a UI component that expects sorted input
- Alphabetizing word lists for vocabulary sheets or study materials
Frequently Asked Questions
Does case-sensitive sorting put uppercase before lowercase? In standard ASCII order, uppercase letters (A=65, Z=90) come before lowercase letters (a=97, z=122). So in a case-sensitive sort, "Zebra" would sort before "apple." Case-insensitive mode avoids this by treating both as equal and sorting purely by letter value.
Can it sort a list numerically? Basic alphabetical sorting will treat numbers as strings, which produces unexpected results for multi-digit numbers ("10" before "9"). For purely numeric lists, use a spreadsheet or coding environment with explicit numeric sort.
What counts as a "line"? Any text ending in a newline character is a separate line. If you paste a paragraph without line breaks, the entire paragraph is treated as a single item.
Is there a limit to how many lines I can sort? No enforced limit. The tool runs in your browser and handles thousands of lines without performance issues.
Use the Sort Lines tool free, no sign-up required.