Sort Lines Alphabetically
Alphabetically sort a list of lines ascending or descending.
Input
Sorted
In-depth explanation
Sort each line of text A→Z or Z→A. Optionally ignore case and drop empty lines before sorting. Everything runs locally in your browser — your inputs are not uploaded to produce the result.
By default case is ignored so “apple” and “Apple” sort together. Turn on case sensitive if you need ASCII-style ordering. Choose the Z → A option.
Sorting is lexicographic, so “10” comes before “2”. Pad numbers if you need numeric order. Tweak the inputs above to compare options, then copy or note the result you need.
Lexicographic sort means “10” comes before “2” because character “1” is before “2”. Pad numbers (01, 02, 10) if you need numeric order. Case-insensitive is the default so “apple” sits with “Apple”.
Drop empty lines if they are noise. Reverse sort is Z→A. This is not a spreadsheet: it will not sort by a second column. For unique sorted lists, de-dupe after sorting if you also want first-seen order abandoned.
Frequently asked questions
Is sorting case-sensitive?
By default case is ignored so “apple” and “Apple” sort together. Turn on case sensitive if you need ASCII-style ordering.
Can I sort Z to A?
Yes — choose the Z → A option.
Do numbers sort naturally (2 before 10)?
No — sorting is lexicographic, so “10” comes before “2”. Pad numbers if you need numeric order.
Related tools
Explore similar utilities you might find useful next.
