Sort Text Lines
Sort lines of text alphabetically (A-Z or Z-A), by length, in reverse order, or shuffled randomly. Six modes, instant output. Browser-based.
sortSort Mode
What is the Sort Text Lines?
A line sorter takes a block of text where each line is a separate item (a list, a column of names, a set of imports) and reorders it. The six common modes cover most real needs: alphabetical both directions, by length both directions, reverse order, and a random shuffle for when bias matters.
How to use the Sort Text Lines
- 1
Paste your lines
Drop the text into the input pane. Each item should be on its own line; blank lines are kept and treated as empty entries.
- 2
Pick a sort mode
A-Z and Z-A are alphabetical, case-insensitive. Shortest/Longest First sorts by character count. Random Shuffle gives an unbiased reorder. Reverse just flips the existing order.
- 3
Read the output
The sorted lines appear in the second pane. The line count shows how many entries you started with.
- 4
Copy and paste back
Hit Copy to send the sorted text to your clipboard, ready to drop into whatever needed sorting.
Frequently Asked Questions
What sort modes are available?
Six: A-Z (alphabetical, case-insensitive), Z-A (reverse alphabetical), Shortest First (by character count, ascending), Longest First (by character count, descending), Random Shuffle (Fisher-Yates), and Reverse Line Order (flips the current order without sorting).
Is the sort case-sensitive?
Alphabetical sort is case-insensitive, so "apple" and "Apple" sit next to each other. The original casing is preserved in the output, so the lines look exactly as you typed them. Use Reverse Line Order if you need a strict order without case folding.
Can I sort numbered lists?
Alphabetical sort treats numbers as text, which means 1, 10, 2 sorts to 1, 10, 2 (not the natural 1, 2, 10). For numeric sorting, give your lines consistent zero-padding (01, 02, 10) so the lexicographic order matches the numeric order.