An unsorted list is a list you have to read in full every time. The moment a list is alphabetical, your eye can jump straight to the neighbourhood of the entry you want, duplicates sit next to each other where you can see them, and two lists can be compared line by line. Sorting by hand is fine for five items and miserable for five hundred, and it only takes one interruption to lose your place and start over. This tool sorts a list of any size in one click, in the box where you pasted it, and offers the four orders people actually need: A–Z, Z–A, by length, and a true random shuffle.
The two options underneath the buttons settle the arguments every sorting tool provokes. Case sensitivity decides whether capitals jump the queue: with it off, "Apple", "banana" and "Cherry" sort in the friendly a-b-c order a human expects; with it on, all capitalised lines come before lowercase ones, the strict order computers use internally — the right choice for code, tags and identifiers, the wrong one for a guest list. The duplicate option removes repeated lines as part of the same pass, so a list can be cleaned and ordered in a single visit. Leave it unticked and every line survives, duplicates included, merely rearranged.
Worked example: five fruits, four orders
The box starts with banana, Apple, cherry, date and Elderberry — deliberately mixed in case. Press Sort A–Z with the options unticked and you get Apple, banana, cherry, date, Elderberry: capitals ignored, the order a person would write. Press Sort Z–A and the same list reverses exactly. Now tick case-sensitive and sort A–Z again: Apple and Elderberry move to the front, ahead of banana, because capitals sort before lowercase letters in strict order. Finally try Sort by length: date (4 characters) first, then Apple (5), then banana and cherry (both 6, kept in their original relative order), and Elderberry (10) last. Four genuinely different arrangements of the same five lines, each the right answer for a different job — finding a name, checking a code list, or spotting the longest entry at a glance.
Sorting is the cheapest data check there is
Experienced data handlers sort lists not just to tidy them but to interrogate them. Sorted, duplicates stop hiding — two identical lines stand shoulder to shoulder, and near-duplicates with a typo or an extra space sit close enough to notice. Sorted by length, the freak entries reveal themselves: the address that is twice as long as every other, the name with a whole sentence pasted into it. Sorted alphabetically, gaps show too — the letter range with no entries at all is often where a chunk of data went missing. None of this requires a database or a spreadsheet formula; it requires thirty seconds and the habit of looking at your data from a second angle before you trust it. Pair this tool with the line counter to confirm the row count before and after, and with the duplicate remover when order matters more than alphabet.
Sorting names, titles and other awkward lines
Real-world lists are rarely as tidy as the fruit in the example. Names arrive as "Dr Khan", "khan, dr" and "KHAN" in the same file; titles begin with "The" that nobody files under T; numbered entries sort as text, so "Chapter 10" lands before "Chapter 2" unless the numbers are padded with a leading zero. Sorting cannot fix inconsistent data, but it does the next best thing: it parks every variant of the same entry within a few lines of each other, turning an invisible mess into a short, visible one you can standardise by hand. Sort first, tidy the clusters the sort reveals, then sort once more — the second pass takes seconds and confirms the list is genuinely in order, rather than merely looking tidier than it did.
Frequently asked questions
How do I alphabetize a list with this tool?
Paste your list with one item per line and press "Sort A–Z". Every line is rearranged into alphabetical order instantly. Press "Sort Z–A" for reverse alphabetical order. The sort happens in the same box, so you can copy the result straight away.
What does the case-sensitive option change?
With case-sensitive off (the default), sorting ignores capitals, so "Apple", "banana" and "Cherry" sort as a, b, c — the order a person expects. With it on, capital letters sort before lowercase ones, so "Apple" and "Cherry" come before "banana". That strict order is what most computer systems use, and it matters for code and identifiers.
What does 'Sort by length' do?
It orders lines from shortest to longest by character count, keeping lines of equal length in their original relative order. It is handy for tag clouds, headline checks, password and code lists, and spotting the odd entry that is far longer than the rest.
How does the shuffle option work?
Shuffle puts the lines into a genuinely random order using your browser's random generator — every line has an equal chance of landing anywhere. It is ideal for running orders, quiz questions, draw lists and breaking a deliberate order so nobody can predict what comes next.
Can sorting also remove duplicates?
Yes — tick "Remove duplicates while sorting" and repeated lines are dropped before the sort, keeping the first copy of each. Whether "Apple" and "apple" count as duplicates follows the case-sensitive setting. For deduplication alone, with the original order untouched, use our remove duplicate lines tool instead.
How are numbers inside lines sorted?
As text, character by character — so "item 10" sorts before "item 2", because "1" comes before "2". This is standard alphabetical behaviour. If you need true numerical order, pad the numbers with leading zeros (item 02, item 10) and they will sort correctly.
Can I sort a list from a file?
Yes — open the file, select all the text, copy it and paste it here, then press a sort button. Because everything runs in your browser, even private lists are safe: nothing is uploaded or stored.
Will sorting change anything besides the order?
No. The lines themselves are never edited — same spelling, same capitals, same punctuation. Only their order changes (plus any duplicates you asked to remove). Sort a copy first if you need to keep the original arrangement as well.
Is this sort lines tool free and private?
Yes. It is completely free with no sign-up, and your text never leaves your device — the sorting happens entirely in your browser.