Sort lines

Sort a list of lines alphabetically, in number order, by length, in reverse, or shuffle it randomly.

Your files stay on your device. Nothing is uploaded.

Sort lines

Updates as you type

Step 1: Type or paste your text

Step 2: Options

Order
Also

Step 3: Copy or download

How to sort lines

  1. Paste your list

    Paste the lines into the first box.

  2. Choose the order

    Pick A to Z, Z to A, numbers in order, shortest first, reverse or shuffle. Choose whether capital letters matter and whether to remove duplicates.

  3. Copy the sorted list

    The sorted list appears as you type. Copy it or download a .txt file.

About this tool

Numbers in order

Normal A to Z sorting puts "item 10" before "item 2", because it compares one character at a time. Numbers in order reads numbers as numbers, so item 2 comes before item 10.

Shuffle is truly random

Shuffle uses your browser's secure random number generator and a fair shuffle, so every order is equally likely. Useful for random groups, draws and quiz questions.

Letters of every language

Sorting follows the rules of your device's language, so accented letters and other alphabets sort where people expect them.

Privacy

This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.

Frequently asked questions

Where do blank lines go?

Blank lines are left out when sorting, so they do not all gather at the top. Reverse keeps the list exactly as it is, upside down.

Can I sort by a column?

Not here. For tables, open the file in a spreadsheet, or convert it with CSV to Excel first.

Is my list uploaded?

No. The text stays in your browser and is never sent anywhere.

Can I remove duplicates at the same time?

Yes. Tick Remove duplicate lines.