How to sort text lines alphabetically
- Paste your list into the left box, with one item on each line.
- Choose the order you want. A to Z is the default.
- Click Copy or Download to save the sorted list.
Ways to sort
| Order | What it does |
|---|---|
| A to Z, Z to A | Alphabetical order, forwards or backwards. Accented letters are placed correctly. |
| Numbers | Sorts by the first number on each line, so 2 comes before 10. Lines with no number go last. |
| Shortest or longest first | Orders lines by how many characters they have. |
| Reverse | Flips the list upside down without sorting it. |
| Shuffle | Puts the lines in a random order, for example to draw names fairly. |
Why do numbers sort strangely in A to Z?
Alphabetical sorting compares text one character at a time, so 10 comes before 2 because 1 comes before 2. If your lines are numbers, or start with a number, choose one of the Numbers orders instead.
Good uses
- Alphabetizing a guest list, class register or reading list.
- Putting a bibliography or glossary in order.
- Sorting keywords, tags or product names before pasting them into a spreadsheet.
- Shuffling a list to assign tasks or pick a random order.
To only remove repeated lines without changing the order, use Remove Duplicate Lines.
Your text stays on your device
Everything happens in your web browser. Nothing you type or paste is sent to a server or stored, so it is safe to use with private notes, passwords, keys and work documents. There is no sign-up and no limit.
Frequently asked questions
How do I put a list in alphabetical order?
Paste the list with one item per line. It is sorted A to Z straight away.
Can it sort numbers correctly?
Yes. Choose “Numbers, smallest first” so that 2 comes before 10.
Can I sort a list in reverse alphabetical order?
Yes. Choose Z to A.
Is my list uploaded?
No. Sorting happens in your browser.