About Sort Lines
This tool sorts a list of lines in a few clicks. Paste one item per line, then choose A to Z, Z to A, shortest first, longest first, Numeric, Reverse or Shuffle. The sorted list appears in the result box ready to copy. It suits name lists, keywords, file names, numbers and anything else that comes one per line.
Alphabetical sorting uses your browser's locale-aware comparison and ignores case by default, so apple and Banana sort naturally; untick Ignore case for strict comparison. Numeric mode reads the number at the start of each line, so 2 comes before 10, and lines with no leading number are placed at the end. You can also remove blank lines. Nothing leaves your browser.
How to use Sort Lines
- 01
Paste your list, one item per line.
- 02
Pick a sort order.
- 03
Copy the sorted result.
When to use it
- Alphabetise a list of names, countries or products for a document or website.
- Sort a list of numbers or prices so 2 comes before 10.
- Order lines by length to find the shortest or longest entries.
- Shuffle a list of names to draw a random order for a raffle or presentation.
- Reverse the order of a list copied from a log or table.
Frequently asked questions
How do I sort lines alphabetically online?
Paste one item per line and click A to Z. The sorted list appears in the result box. Click Z to A for reverse alphabetical order. Copy the result when you are done.
Can it sort numbers correctly?
Yes. Use Numeric so that 2 comes before 10. Plain alphabetical sorting compares text character by character and would put 10 first. Numeric reads the number at the start of each line.
What happens to lines that do not start with a number in Numeric mode?
They are placed after all the numeric lines and ordered alphabetically among themselves. This keeps headings or notes together at the end instead of mixing them into your numbers.
Does it sort Arabic text?
Yes. A to Z and Z to A use your browser's language-aware text comparison, which handles Arabic letters. The exact order can differ slightly between browsers and devices, particularly for letters with diacritics.
Is the Shuffle option truly random?
Shuffle uses the browser's standard random number generator, which is fine for raffles, playlists and everyday picks. It is not designed for security or cryptographic use, and each click gives a new order.
Is my list uploaded to a server?
No. Sorting runs entirely in your browser, so your list is not uploaded or stored, and there is no sign-up or limit on how many lines you can sort.