Sort Lines Alphabetically
Sort lines AāZ or ZāA with case options and custom sorting rules for list organization and data management. Perfect for organizing lists and sorting data.
Complete Guide: Sort Lines Alphabetically
Everything you need to know about using this tool effectively
The Sort Lines Alphabetically tool arranges lines of text in alphabetical order. You choose ascending (A-Z) or descending (Z-A) order, and whether sorting is case-sensitive or case-insensitive. A numeric sorting mode handles lines that start with numbers, sorting by value instead of lexicographic order. The tool can also remove duplicate lines during sorting. All processing happens in the browser.
This tool splits your text into lines, applies a sort based on the options you select, and outputs the sorted result. Case-insensitive sorting treats 'Apple' and 'apple' as equivalent. Numeric sorting parses leading numbers so that '10' comes after '2' instead of before it. The dedup option removes identical lines while sorting.
Organizing a list alphabetically
Sort a contact list, glossary, or reference list in alphabetical order for easier lookup.
Sorting code imports
Arrange import statements in a code file alphabetically for cleaner organization.
Ordering data by numeric value
Sort lines that start with numbers (like scores or IDs) in numeric order using numeric sort mode.
Deduplicating and sorting simultaneously
Remove duplicate entries and sort the remaining lines in one operation.
Paste your lines
Copy and paste text with one item per line into the input area.
Choose sort options
Select order (ascending/descending), case sensitivity, and whether to remove duplicates.
Sort
Click the button. The tool sorts all lines instantly.
Copy the result
Copy the sorted text or download it as a file.
Case-insensitive mode produces more natural alphabetical ordering.
Numeric sort is useful for lines starting with numbers like prices or scores.
Remove duplicates option cleans your list while sorting.
For very large lists, sorting may take a moment depending on your device.
What is the difference between case-sensitive and case-insensitive sorting?
Case-sensitive sorting places uppercase letters before lowercase ones (so 'Banana' comes before 'apple'). Case-insensitive sorting ignores case for a more natural alphabetical order.
How does numeric sorting work?
Numeric sorting parses any leading number in each line and sorts by numeric value. This means '10 Item' comes after '2 Item' instead of before it.
Is there a limit on list size?
There is no hard limit. The tool handles thousands of lines, though very large lists may take a moment.
Is my text uploaded to a server?
No. All processing happens in your browser using JavaScript. The text never leaves your device.
Can I sort in reverse order?
Yes. Select descending (Z-A) order to sort from the end of the alphabet to the beginning.
Text Manipulation Tools for Writers & Developers
Manipulate text efficiently. Convert case, find and replace, remove duplicates, sort lines, clean extra spaces, reverse text, split content, and remove punctuation or emojis.
Text Formatting & Cleanup Tools
Professional text formatting and cleanup tools for writers, developers, and content creators. Remove duplicates, extra spaces, find and replace, sort lines alphabetically, and clean up messy text quickly.