Sort Lines
Sort a list alphabetically, numerically or by length as you paste it.
Runs in your browser — nothing is uploaded
How to use Sort Lines
- 1
Paste your list into Your lines, one item per line.
- 2
Choose an order: A → Z, Z → A, Natural (1, 2, 10), By length, Shuffle or Reverse order.
- 3
Tick Case-sensitive or Remove empty lines if you need them; select Shuffle again for a new random order.
- 4
Select Copy result to copy the sorted list.
About this tool
Alphabetical sorting uses your browser's language rules (the same Intl.Collator that powers sorting in web apps), so accented letters sit next to their plain versions instead of after Z. By default upper and lower case are treated as equal; tick Case-sensitive to put capitals first when two lines otherwise match.
Plain alphabetical order compares character by character, which puts “item 10” before “item 2”. Natural order reads runs of digits as whole numbers, giving item 1, item 2, item 10, the order most people expect for file names, chapters and versions. By length sorts shortest first and breaks ties alphabetically.
Shuffle uses a Fisher–Yates shuffle, which does not favour any order; select Shuffle again for a new one. It is fine for picking a random order for a quiz or a draw, but it is not meant for security or lottery use. Reverse order simply flips the list upside down without sorting.
Your list is sorted locally in your browser and is never uploaded.
Questions people ask
How do I sort numbers correctly so 10 comes after 9?
Choose Natural (1, 2, 10). It compares numbers inside lines by value instead of digit by digit.
Can I sort a list Z to A?
Yes. Choose Z → A for reverse alphabetical order.
Does sorting remove duplicate lines?
No, duplicates are kept. Use Remove Duplicate Lines first if you want each item once.
How are capital letters sorted?
By default case is ignored, so “apple” and “Apple” sit together. With Case-sensitive ticked, upper case comes first when lines are otherwise identical.
Related tools
- Remove Duplicate LinesPaste a list and get back each line once, in its original order.
- Reverse TextWrite text backwards, reverse the word order, or flip each word.
- Text ComparePaste two versions of a text and see exactly what was added and removed.
- Word CounterCount words, characters, sentences and reading time as you type.
- Character CounterCount characters as you type and see how much room is left under a limit.
- Case ConverterChange text to upper, lower, title, sentence or programming case in one click.