Skip to content

Sort Lines Alphabetically, by Number or by Length

Paste a list with one item per line and put it in order in a single click. Choose alphabetical, natural number order, shortest first, reversed or shuffled.

Order

0 characters · 0 lines
0 characters · 0 lines

How to sort lines

  1. Paste your list into the "Your text" box, one item per line. "Try an example" loads a list of countries with mixed capitals.
  2. Choose an order: A → Z, Z → A, Natural (2 before 10), Shortest first, Reverse order or Shuffle.
  3. Set the options. Decide whether capitals matter, and whether to remove empty lines (on by default) and repeated lines.
  4. Copy the sorted list or download it as a .txt file. When shuffling, press "Shuffle again" for a new order.

Features

  • Alphabetical A to Z and Z to A, using your browser's language-aware comparison so accented letters sort next to their plain versions.
  • Natural number order for file names, chapters, invoice numbers and anything with numbers inside.
  • Shortest first, sorting by length with alphabetical order for ties.
  • Reverse order to flip a list without sorting it.
  • Shuffle with a button for a fresh order.
  • Remove empty lines and exact duplicates in the same step.

Alphabetical or natural sort?

Computers sort text one character at a time. That works for words, but numbers go wrong: in a plain A → Z sort, "file10.jpg" lands before "file2.jpg" because the character 1 comes before 2.

Natural order fixes this by treating runs of digits as numbers:

  • A → Z: file1, file10, file11, file2, file3
  • Natural: file1, file2, file3, file10, file11

Use natural order for photo names, numbered lessons, room numbers, version lists and anything like "Week 3". Stick with A → Z for plain words, where both give the same answer. Note that natural order reads whole numbers, so decimals like 1.5 and 1.25 are compared as two separate numbers either side of the dot. For lists of decimal values a spreadsheet is more reliable.

Sorting by length and shuffling

"Shortest first" is useful more often than you might expect: ordering keywords from short phrases to long-tail ones, or finding the longest product names that might not fit on a label.

Shuffle helps whenever order shouldn't be predictable: mixing quiz questions, choosing who speaks first in a meeting or randomising a practice list of vocabulary.

Why use Fileora's line sorter

Opening a spreadsheet just to alphabetise a list is overkill. Here you paste, pick an order and copy, and the options for blank lines and repeats save a second clean-up step.

Your data stays on your device, which matters for lists of names, customers or grades. It is free, needs no registration and works on phones and tablets.

For more list work, remove near-duplicates with remove duplicate lines, fix stray spaces with remove extra spaces, or flip letters and words using reverse text.

Frequently asked questions

How do I sort numbers correctly?

Choose "Natural (2 before 10)". Ordinary alphabetical sorting compares text character by character, so "10" comes before "2" because 1 is less than 2. Natural order reads the digits as whole numbers, giving 1, 2, 10, 20, and "Chapter 9" before "Chapter 10".

How are capital and accented letters sorted?

With "Case sensitive" off, the sort ignores capitals and accents and compares the base letters, so a, A and ä are treated as equal. Lines that tie keep the order they had in your list. Turn on "Case sensitive" to separate capitals and accented letters and get a strictly predictable order.

Can I sort by surname or by the second column?

No. Each line is sorted from its first character. To sort by surname, put the surname first on each line, for example "Khan, Ayesha", or sort the column in a spreadsheet.

What does "Reverse order" do?

It flips your list upside down without sorting it, so the last line comes first. It is handy for putting a log or a list of dates newest first. To reverse the letters or words inside each line, use the reverse text tool.

Is the shuffle truly random?

It gives a well-mixed order for everyday uses such as quiz questions, a presentation running order or a reading list. Press "Shuffle again" for a different order. It is not designed for prize draws or anything where fairness must be provable.

How does "Remove duplicates" differ from the duplicate line remover?

Here it removes only lines that are exactly identical, including capitals and spaces. The remove duplicate lines tool can also ignore case and trailing spaces, and keeps your original order.

Is my list uploaded?

No. The sorting runs in your browser. Your list is never sent to a server or saved.

Can't find the tool you need, or something isn't working?

Tell us which tool you'd like next or what went wrong. We read every message, and requests decide what we build next.

Opens your email app. Please don't attach private files.