Sort Lines Alphabetically
Paste a list and get its lines back in A-to-Z order.
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Paste a list and get its lines back in A-to-Z order.
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Because the digits in a line are compared as a number: 2 is smaller than 10, so photo-2.jpg comes first even though its line is shorter.
Apple sits next to apple. Capitals aren't sent to the top as a group.
In English, Äpfel files under A. A browser set to Swedish puts it after Zucker, because Ä is one of the letters after Z in the Swedish alphabet.
A line that's in the list twice is sorted twice. Remove Duplicate Lines takes the second one out.
Limits A blank line sorts to the very top.
Suppose you're sending someone six photos, numbered between 1 and 20 and named from photo-1.jpg up to photo-20, and you want to list them in order in your message. You paste the names here, and the list starts photo-1.jpg, photo-2.jpg, photo-3.jpg. photo-10.jpg turns up in fourth place.
That's the order you'd count in. The tool reads a run of digits as one number, so 10 comes after 9 and before 11, and every line comes back exactly as you typed it.
Sorted twice
A plain text sort looks at one character at a time, so it puts 10 before 2: the 1 is smaller than the 2, and the 0 never gets a say. This tool reads each run of digits as a whole number and compares the numbers instead.
That is why photo-2.jpg comes before photo-10.jpg. The letters around the digits still follow your browser's alphabet order, so your language setting can move a few letters but never the numbers.
You don't need to pad numbers with zeros. photo-01.jpg and photo-1.jpg sort to the same place, and the tool keeps whichever spelling you pasted.
Paste your names as they are. Numbers in a line are compared by value, so 2 comes before 10.
Paste the names into the Lines box, one to a line.
Read down the Sorted A → Z box for a 10 sitting above a 2. A wide screen shows the box beside your list; a phone keeps it under Result.
If you find one, put a 0 in front of each single digit in the Lines box. The sorted list changes as you type.
Sorted Z → A and Reversed lines are two more choices under To there. Reversed lines keeps your order and flips it.