Skip to content
GAMETROZ

Text Sorter

Sort lines A to Z, Z to A, by number, by length, shuffle them or reverse the order.

Processed locally in your browser.

About Text Sorter

Alphabetizing a guest list, ordering file names that contain numbers or randomizing a list of names are all line-sorting jobs. Paste the list and choose how it should be ordered.

Alphabetical sorting compares text character by character, so item10 comes before item2. Natural order compares the numbers by value and puts item2 first. The shuffle uses your browser's secure random generator, so every ordering is equally likely.

How to use Text Sorter

  1. 1Paste your list with one item per line.
  2. 2Pick a sort order from the menu.
  3. 3Turn on the options you need: ignore case, remove empty lines or remove duplicates.
  4. 4Copy the sorted list, or press Shuffle again for a new random order.

Examples

Input

item10
item2
item1

Result

item1
item10
item2
A to Z compares digits as text.

Input

item10
item2
item1

Result

item1
item2
item10
Natural order compares numbers by value.

Input

pear
fig
banana

Result

fig
pear
banana
By length, shortest line first.

Frequently asked questions

Why does item10 come before item2?

Plain alphabetical sorting compares one character at a time, and 1 comes before 2. Choose natural order to sort the numbers inside a line by their value instead.

Is the shuffle really random?

It uses the Web Crypto random number generator built into your browser with an unbiased Fisher-Yates shuffle, so no ordering is favored. It is a good fit for draws and raffles that do not need an audit trail.