SortLines Alphabetically

Paste a list, one item per line, and put it in alphabetical order. You can also sort Z to A, by length, reverse it or shuffle it.

  • Free forever
  • No sign-up
  • Runs in your browser

Your list

Sorted list

apple
banana
banana
Cherry
Éclair
Item 2
Item 10
kiwi
Mango
Lines in
10
Lines out
9

A to Z follows dictionary order, so accented letters sit with their plain ones, and symbols and numbers come before letters. Shuffle uses a random order you can redraw as often as you like.

How to use the Sort Lines Alphabetically

  1. 1

    Paste your list, one item per line.

  2. 2

    Choose an order: A to Z, Z to A, by length, reversed or shuffled.

  3. 3

    Turn on the clean-up options you need.

  4. 4

    Copy the sorted list.

How alphabetical order works here

Lines are sorted the way a dictionary does it, not by computer code order. That means accented letters sit with their plain ones (Éclair next to eclair), and with Ignore case on, “apple” sits next to “Apple” instead of after every word that starts with a capital.

Numbers and symbols come before letters. With Numbers in order on, numbers inside a line are read as whole numbers, so “Item 2” comes before “Item 10”. Without it, “Item 10” comes first, because 1 comes before 2.

The other orders

Beyond A to Z:

  • Z to A: alphabetical, backwards.
  • Shortest first or Longest first: by number of characters, with ties in A to Z order.
  • Reverse current order: flips the list without sorting it, so the last line comes first.
  • Shuffle: a random order. Tap Shuffle again for a new one, handy for picking a giveaway winner or a running order.

Cleaning up while you sort

Pasted lists often come with stray spaces and blank lines. Trim each line removes spaces at the start and end, which also stops “ banana” from sorting before “apple”. Remove empty lines drops the blanks, and Remove duplicates keeps one copy of each line.

Sorting in Word, Google Docs and Excel

In Word, select the list and use the Sort button (A→Z) on the Home tab. Google Docs has no built-in sort, so a tool like this one is the quickest way. In Excel or Google Sheets, select the column and use Data → Sort range, or =SORT(A:A) in Sheets.

Frequently asked questions

How do I put a list in alphabetical order?

Paste the list here with one item per line and choose A to Z. Copy the result. It works for names, words, links or anything else on separate lines.

Why does “Item 10” come before “Item 2”?

Plain alphabetical order compares one character at a time, and 1 comes before 2. Turn on Numbers in order to sort numbers by their value.

How do I alphabetise in Google Docs?

Google Docs has no sort button. Copy your list, paste it here, sort it and paste it back.

Can I sort by last name?

Not directly, since the whole line is sorted. Put lines in “Last, First” order first, for example with find and replace, then sort.

Is the shuffle truly random?

It's random enough for picking a winner or mixing a list, using a standard Fisher–Yates shuffle. It isn't meant for anything that needs cryptographic randomness, like passwords.

Embed this tool on your site

Want the Sort Lines Alphabetically on your own page? Copy the embed code and paste it where you want it to show up.

  • Free to use on your blog or site, with no account.
  • It sizes itself to fit and works on phones.
  • Keep the credit line so readers know where it's from.
your-site.com/blog

Free Sort Lines Alphabetically by Hiyaly

Put it allon one link.