Skip to content
atifo

Browse tools

Sort lines alphabetically

Sort any list A–Z, by number or length, or shuffle it.

Processed in your browser. Nothing is uploaded.

How to sort lines alphabetically

  1. 1

    Paste your list with one item per line.

  2. 2

    Pick a sort order, such as A → Z or Natural.

  3. 3

    Copy or download the sorted list.

Sort any list

Paste names, words, file names or numbers, one per line, and get them back in order. Sorting uses your browser’s language rules, so accented names sort with their base letters and capitals don’t jump ahead of lowercase words unless you want them to.

Sort alphabetically, sort a list online by number or length, or randomize a list.

Sort orders

  • A → Z and Z → A for alphabetical order.
  • Natural understands numbers inside text: “Chapter 2” comes before “Chapter 10”, and “file9.jpg” before “file10.jpg”.
  • Shortest first and Longest first sort by length, which is handy for tidying keyword lists.
  • Reverse current order flips the list without sorting it.
  • Random shuffle mixes the list fairly. Use it to pick a winner, assign presentation order or create random teams. Tap “Shuffle again” for a new order.

Tidy while you sort

Switch on “Remove duplicates” to drop repeated lines in the same step, and keep “Remove empty lines” on to clear blank rows. Spaces at the start and end of each line are trimmed so they don’t affect the order.

Private and instant

Long lists are sorted immediately on your device and never uploaded. To remove duplicates without changing the order, use Remove duplicate lines instead.

Frequently asked questions

What is natural sort order?

Natural order understands numbers inside text, so “Item 2” comes before “Item 10”. Plain alphabetical order would put “Item 10” first.

Does it sort names with accents correctly?

Yes. Sorting uses your browser’s language rules, so “Émile” sorts with the E names rather than after Z.

Can I pick a random winner from a list?

Choose Random shuffle and take the first line. Tap “Shuffle again” for a new order. The shuffle is fair: every order is equally likely.

Will blank lines be kept?

Not by default. Switch off “Remove empty lines” to keep them.