Sort Text Lines
Sort lines alphabetically, numerically or reversed.
Result
Frequently asked questions
How do I sort a list of lines alphabetically?
Paste your text into the tool and choose alphabetical order; it splits the input on line breaks and reorders the lines. You can also flip to reverse order for Z to A.
What is the difference between alphabetical and numerical sorting?
Alphabetical sorting compares text character by character, so 10 can come before 2. Numerical sorting reads each line as a number, so it orders 2 before 10 the way you would expect for figures.
What does the ignore-case option do?
It treats uppercase and lowercase letters as equivalent when comparing lines, so Apple and apple sort together instead of all capitalised words clustering first. The original casing of each line is preserved in the output.
Can I sort lines by length?
Yes. The sort-by-length mode orders lines from shortest to longest based on how many characters they contain, which is useful for tidying lists or spotting outliers.
What does the shuffle option do?
Shuffle randomly reorders the lines instead of sorting them, giving a different arrangement each time. It is handy for randomising a list or picking an unbiased order.
Does the trim option change my text?
Trim removes leading and trailing spaces from each line before sorting so that stray whitespace does not affect the order. It cleans up the compared values without altering the words themselves.
Is my text uploaded when I sort it?
No. Sorting, shuffling and de-duplication all happen in your browser, so the text you paste never leaves your device.