Sort List
Paste a list, one item per line, and sort it alphabetically A to Z or Z to A, in natural order so "2" comes before "10", by length, reversed or shuffled. You can drop empty lines and number the result. It uses your browser's own language-aware comparison, and the list never leaves your device.
Works anywhere in the world, wherever you are.
Each line is one item of the list.
Items in the list
0
Alphabetical, A → Z
- Lines pasted
- 0
- Empty lines removed
- 0
Result
Dictionary order for the page language: accents and capitals do not split words apart, and on the Spanish page ñ sorts after n.
What you paste never leaves your device: the list is sorted in your browser, the text is not in the Share link and it is not saved anywhere. Close or reload the page and it is gone.
Related tools
Remove Duplicate Lines
Everyday
Keep each line of a list just once, in its order.
OpenCase Converter
Everyday
UPPERCASE, lowercase, sentence case, title case and more.
OpenWord and Character Counter
Everyday
Words, characters, sentences and reading time.
OpenName Picker Wheel
Everyday
Paste a list, spin the wheel and pick a random winner.
OpenAbout this calculator
How to use it
Paste the list in the box and pick how to sort it. The result shows up underneath as you type. "Copy result" puts it on your clipboard, "Download .txt" saves it as a file and "Reset" clears the list and goes back to the starting options.
By default, empty lines and spaces at the start and end of each line are removed, so an invisible space does not send an item to the top of the list. If you need them, pick "Keep" or "Keep them". "Number the list" adds 1., 2., 3. in front of each line after sorting.
Each way to sort
Alphabetical: dictionary order for the page language, using the browser's own language comparison (Intl.Collator). Accents and capitals do not split words apart, so "Ángel" sits next to "angle" rather than at the end of the list. On the Spanish page, ñ is a letter of its own that comes after n, as in a Spanish dictionary; on this page it sorts as an n.
Natural: the same as alphabetical, but numbers inside the text compare by value. In strict alphabetical order "Chapter 10" comes before "Chapter 2", because 1 comes before 2; in natural order 2 comes before 10, as anyone would expect.
By length: from the shortest line to the longest, or the other way, counting characters. Lines of the same length go in natural order. Reverse order: the same list from the last line to the first, with nothing else sorted.
Shuffle: mixes the list with the browser's cryptographic generator (crypto.getRandomValues) and the Fisher–Yates method, so every possible order is equally likely. Good for drawing turns, presentation order or a gift exchange. "Shuffle again" gives another order.
Example
The list "ñame, naranja, papa, malanga, yautía, batata", one per line, sorted A to Z on this page gives: batata, malanga, ñame, naranja, papa, yautía, because English treats ñ as an n. On the Spanish page it gives batata, malanga, naranja, ñame, papa, yautía, with ñ after n. By length: ñame, papa, batata, yautía, malanga, naranja.
With "Chapter 10, Chapter 2, Chapter 1", alphabetical order gives Chapter 1, Chapter 10, Chapter 2; natural order gives Chapter 1, Chapter 2, Chapter 10. With "Number the list" on, natural order gives 1. Chapter 1, 2. Chapter 2, 3. Chapter 10.
Your list stays with you
Everything happens in your browser. The list is not sent to any server, is not in the Share link, is not saved on your device and is not recorded in the site's statistics; the "Share" link only carries the options you picked. Reload or close the page and the list is gone.
Important limitations
- It sorts whole lines. To sort by one column of a table or a CSV, use a spreadsheet.
- Alphabetical order follows the rules of the page language. For Spanish order, with ñ after n, use the Spanish page.
- Punctuation at the start of a line, such as quotes or dashes, counts when sorting and can move that line to the top. Remove it first if it should not count.
- Shuffle is fine for informal draws. It is not a certified drawing: for regulated raffles or lotteries, follow the rules that apply to you.
Frequently asked questions
This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.