Sort Text Lines Online

Sort a list of lines alphabetically, numerically, by length, or shuffle them randomly — right in your browser. Your text stays local.

Sort Text Lines runs entirely in your browser. The list you paste is sorted on your device and is never uploaded to ArrayKit or any server.

Open the Remove Duplicate Lines tool

About Sort Text Lines

Sort Text Lines takes a pasted list — one item per line — and reorders it however you need. Sort alphabetically A→Z or Z→A, sort numerically so item2 lands before item10, order by line length, or shuffle the lines into a random order. Toggles let you compare case-insensitively, trim surrounding whitespace, drop blank lines, and remove duplicates before sorting, so a messy paste becomes a clean, ordered list. The output updates live with a running line count you can copy or download as a text file. It is handy for tidying config values, alphabetizing names or imports, ordering CSV columns, or randomizing a draw. Everything runs on your device — the list you paste never leaves your browser.

Features

How to use the Sort Text Lines

  1. Paste or type your list, one item per line
  2. Pick a mode: A→Z, Z→A, Numeric, Length, or Shuffle
  3. Toggle case-insensitive, trim, remove blanks, or remove duplicates as needed
  4. Copy the ordered result or download it as a text file

Example

Input

banana
Apple
cherry
apple
cherry

Output

Apple
banana
cherry

A→Z with case-insensitive and remove-duplicates on: the second apple and cherry collapse to the first.

Common errors & troubleshooting

Frequently asked questions

How do I sort a list of lines alphabetically?
Paste your list one item per line, choose A→Z for ascending or Z→A for descending, and the sorted result appears instantly. Turn on 'Case-insensitive' if you want Apple and apple treated as the same.
How is Numeric sort different from alphabetical sort?
Alphabetical sort compares text character by character, so item10 comes before item2. Numeric (natural) sort reads the digits as numbers, so item2, item10, item20 stay in true numeric order.
Does the shuffle produce a truly random order?
Shuffle uses a Fisher–Yates pass to rearrange the lines into a random order. Each click of Reshuffle draws a new arrangement, so you can keep reshuffling until you are happy with the result.
Can I remove duplicates and blank lines while sorting?
Yes. Toggle 'Remove duplicates' to keep only the first copy of each line and 'Remove blank lines' to drop empties. Both apply before the chosen sort so the output is clean and ordered.
What does sorting by length do to lines of equal length?
Length mode orders lines from shortest to longest. When two lines are the same length it breaks the tie alphabetically, so equal-length items still come out in a predictable order.
Is the list I paste to sort uploaded anywhere?
No. Sort Text Lines runs entirely in your browser, so the list you paste is sorted on your device and never sent to ArrayKit or any server.

Related tools

All ArrayKit tools