Sort text lines alphabetically

Paste a list and put it in alphabetical order in an instant. You can also sort by number or length, reverse the list or shuffle it.

How to sort text lines alphabetically

  1. Paste your list into the left box, with one item on each line.
  2. Choose the order you want. A to Z is the default.
  3. Click Copy or Download to save the sorted list.

Ways to sort

OrderWhat it does
A to Z, Z to AAlphabetical order, forwards or backwards. Accented letters are placed correctly.
NumbersSorts by the first number on each line, so 2 comes before 10. Lines with no number go last.
Shortest or longest firstOrders lines by how many characters they have.
ReverseFlips the list upside down without sorting it.
ShufflePuts 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.