Sort lines

Sort lines alphabetically A–Z or Z–A, naturally by numbers, by length, reverse them or shuffle them randomly.

Your text is processed in your browser and never sent to our server.

0 characters · 0 words · 0 lines

How to sort lines alphabetically

Paste any list – names, keywords, file names, product codes – and get it sorted instantly. The tool understands accents, numbers inside text and the Slovak alphabet.

  1. Paste your list into the input box, one item per line.
  2. Choose the order in the Sort menu, e.g. Alphabetically A → Z or Natural.
  3. Tick the clean-up options you need (remove duplicates, empty lines, spaces).
  4. Copy the result, download it or send it to another tool. Click Shuffle lines if you need a random order.

Sort orders and options

  • A → Z / Z → A – classic dictionary order. Letters with accents sort next to their base letter (Adam, Ádám, Bob), not after Z.
  • Natural – numbers inside the text are compared by value, so "item 2" comes before "item 10". Plain A → Z would put "item 10" first.
  • By length – shortest or longest lines first; emoji and accented letters count as one character. Lines of equal length are sorted alphabetically.
  • Reverse order – flips the list upside down without sorting it.
  • Shuffle lines – puts the lines in a random order using the Fisher–Yates algorithm and your browser's cryptographic random generator, so every order is equally likely. Good for raffles, quiz questions or splitting people into groups.
  • Alphabet – Slovak sorts "ch" as a single letter after "h" (hrad, chlieb, ihla); English puts it under "c".
  • Case sensitive – capital letters go before lowercase ones when the words are otherwise equal, and duplicates must match exactly.
  • Remove duplicates / empty lines / Trim spaces – clean the list while sorting. Leading spaces otherwise make a line jump to the top.

Examples

Alphabetical vs. natural sort:

Input      A → Z      Natural
item 10    item 1     item 1
item 2     item 10    item 2
item 1     item 2     item 10

Sort and remove duplicates at once:

banana             apple
apple       →      banana
banana             cherry
cherry

Frequently asked questions

How do I sort lines alphabetically in Excel or Google Sheets?

In Excel select the column and use Data → Sort A to Z; in Google Sheets use Data → Sort range or the formula =SORT(A1:A100). For text copied from a document or e-mail it is faster to paste it here.

How do I shuffle lines randomly?

Paste the list and click Shuffle lines. Each click produces a new random order. Changing the text or any option returns to the sorted view.

Why is "item 10" before "item 2"?

Alphabetical sorting compares character by character and "1" is smaller than "2". Choose Natural to compare the numbers as numbers.

Is my list uploaded anywhere?

No. Sorting and shuffling run locally in your browser; nothing is sent to our server.

Can I only remove duplicates without sorting?

Yes, use the duplicate remover, which keeps the original order. To add text to each sorted line, try add prefix and suffix.