Sort Lines

Paste a list with one item per line and choose how to sort it.

Everything runs in your browser. Your text is never uploaded or stored.

How to sort a list

Paste your list into the left box with one item per line and click a sort order. The sorted list appears on the right. Change the order or options at any time; your original list isn't modified. For Shuffle, click the button again to get a new random order.

Sort orders

  • A to Z / Z to A sorts alphabetically using proper language rules, so accented letters sit next to their plain versions instead of at the end.
  • Natural sorts numbers by value, so "item 2" comes before "item 10". Plain alphabetical sorting would put "item 10" first because it compares characters one by one.
  • Shortest first / Longest first sorts by the number of characters on each line. Lines with the same length are sorted alphabetically.
  • Reverse order flips the list upside down without sorting it.
  • Shuffle puts the lines in a random order, which is useful for picking winners, randomizing quiz questions or splitting people into groups.

Options

Ignore case sorts "apple" and "Apple" together instead of putting all capitals first. Remove duplicates keeps only one copy of each line. Remove empty lines and Trim spaces tidy up lists copied from documents and spreadsheets, where blank rows and stray spaces would otherwise end up at the top of the sorted list.

Tips

Sorting keyword lists by length is a quick way to separate short head terms from long-tail phrases. Sorting a list of URLs alphabetically groups pages from the same folder together, which makes site audits easier to read.

Frequently asked questions

How do I alphabetize a list?

Paste the list with one item per line and choose "A to Z". Keep "Ignore case" ticked so capitalized and lowercase words are sorted together.

Why does 10 come before 2?

Alphabetical sorting compares text character by character, and "1" comes before "2". Choose "Natural" to sort numbers by their value.

Can I sort a column from Excel?

Yes. Copy the column, paste it here, sort it, and paste the result back into your spreadsheet.

Is the shuffle truly random?

It uses a standard unbiased shuffle (Fisher–Yates) with your browser's random number generator, which is fine for everyday uses like raffles and quizzes.

Last updated