EN

Sort Text

Alphabetize a list A to Z or Z to A, or sort lines by length.

Order

Words: 0 · Characters: 0

Built by Jhon WRuns in your browserLast reviewed:

  • Free, no sign-up
  • Your text stays on your device
  • Works on phone and computer
  • 8 languages

Popular tools:Text RepeaterFancy Text GeneratorWord CounterSmall Text Generator

Sort Text is a free online tool that alphabetizes a list, putting its lines in A to Z or Z to A order, and also sorts by length, in reverse or at random, for up to 500,000 characters. Numbers sort by value and capital letters sort with small ones from the start, with no sign-up.

How to sort text in alphabetical order

  1. Paste your list. Paste the lines in the Lines to sort box, with one item on each line.
  2. Choose the order. Pick A to Z, Z to A, Shortest first, Longest first, Reverse or Random.
  3. Copy the result. The sorted list appears in the Sorted lines box. Press Copy to use it.

What does it mean to sort text?

To alphabetize a list is to put its lines in alphabetical order: by the first letter, then the second letter, and so on, as in a dictionary. Alphabetical order is the most common way to sort text, which means putting its lines in a fixed order.

This tool sorts whole lines. Each line is one item, and the words inside a line are not moved.

Sort alphabetically with capitals and numbers

To sort alphabetically, keep A to Z and Ignore case on, as they are from the start. The tool then follows dictionary order: capital and small letters sort together, and numbers inside a line sort by value. With Ignore case off, the tool compares the characters exactly, so lines with a capital letter come first and item10 comes before item2.

SettingsThe list pear, Apple, item10, banana, Cherry, item2 becomes
A to Z, Ignore case onApple, banana, Cherry, item2, item10, pear
A to Z, Ignore case offApple, Cherry, banana, item10, item2, pear
Z to A, Ignore case onpear, item10, item2, Cherry, banana, Apple

Features

  • Six orders: A to Z, Z to A, shortest first, longest first, reverse and random.
  • Numbers sort by value with Ignore case on (the default), so item2 comes before item10.
  • Ignore case option, on from the start.
  • Empty lines removed from the start, with a switch to keep them.
  • Copy, select or download the result as a .txt file.

The six orders

OrderWhat it doesExample
A to ZAlphabetical orderapple, banana, cherry
Z to AAlphabetical order backwardscherry, banana, apple
Shortest firstBy number of characters, shortest line at the topfig, pear, banana
Longest firstBy number of characters, longest line at the topbanana, pear, fig
ReverseTurns the current order upside down without sortingLines 1, 2, 3 become 3, 2, 1
RandomShuffles the lines. Press Shuffle again for a new shuffleA different order each time

With Ignore case on, capital and small letters sort together. With it off, all lines that start with a capital letter come before lines that start with a small letter.

Is it private?

Yes. The list is sorted inside your browser. It is not sent to our server and is not saved by us.

Tips to alphabetize a list

  • Keep Ignore case on for dictionary order. With it off, all lines that start with a capital letter are grouped at the top.
  • Clean spaces at the start of lines first. A space sorts before letters, so such lines come first. Clean the list with the Remove Extra Spaces tool, then sort it.
  • Check words with accents. The tool uses English sorting rules, and other languages order some letters differently. Look over lines that start with an accented letter.
  • Put one item on each line. The tool sorts whole lines and does not move the words inside a line.
  • Sort the whole list in one go. The box takes up to 500,000 characters, so a long list fits and comes out in one order.

Related tools

Three other tools on this site work on lines. The tool to remove duplicate lines deletes repeated entries before or after sorting. The reverse text tool can turn the order of the lines around. The random word generator makes lists of words to sort or shuffle.

Frequently asked questions

How do I put a list in alphabetical order?
Paste the list with one item per line and keep the A to Z order. The sorted list appears in the result box.
How are numbers sorted?
By their value when Ignore case is on, as it is from the start: 2 comes before 10, and item2 comes before item10.
Can I sort from Z to A?
Yes. Choose Z to A for reverse alphabetical order.
Can I shuffle a list?
Yes. Choose Random. Press Shuffle again for a new random order.
Is the Sort Text tool free?
Yes. It is free and you do not need an account.