Alphabetical Order Sorter
Sort lines of text alphabetically. Choose to sort by lines, words, or custom delimited items.
How to use Alphabetical Order Sorter
- 1
Enter your text
Paste or type your list into the input box, where each line is treated as a separate item by default.
- 2
Choose sort type and order
Sort by lines, words, or delimited items, then pick Ascending (A-Z) or Descending (Z-A).
- 3
Set extra options
Turn on 'Ignore case' for case-insensitive sorting or 'Remove duplicate lines' to drop repeats, and set a delimiter if sorting delimited items.
- 4
Sort and copy
Click 'Sort Text' to alphabetize the content, then use the copy button to save the sorted result.
Putting Text in Alphabetical Order, Three Ways
Three sort modes for three shapes of text
Most alphabetizers only handle one input shape. This one handles three: Lines sorts each line as a unit, Words sorts every word across the entire text, and Delimited Items splits on a separator you choose, such as a comma or semicolon, then sorts the pieces. Choosing the mode that matches your text is what makes the result useful instead of scrambled.
Use Lines for stacked lists like names or to-do items. Use Words when you have a paragraph and want its individual words ordered, for example to build a quick word index. Use Delimited Items for inline lists such as "banana, apple, cherry" that live on a single line and need their comma-separated values reordered.
How lexicographic sorting really works
Alphabetizing here is lexicographic, meaning the tool compares text character by character using each character's underlying code, not by any notion of meaning. The first differing character decides the order. This is why "apple" comes before "apply": the first four letters match, and "e" precedes "y." It is dictionary order, extended to every character including spaces and punctuation.
Lexicographic order is fast and predictable, but it is not the same as the "natural" order a human expects for numbers, which the next section covers. For pure letters it behaves exactly like a dictionary, which is what you want for glossaries, name lists, and bibliographies.
Case sensitivity and the Ignore case option
Capital and lowercase letters have different character codes, with uppercase letters ranked first. So when you switch off Ignore case to sort case-sensitively, a strict comparison can place "Zebra" ahead of "apple," because uppercase Z outranks lowercase a in the underlying ordering. This tool keeps Ignore case on by default precisely because that result surprises people who expect a purely alphabetical list.
With Ignore case on — the default — capitals and lowercase fold together so "Apple," "apple," and "APPLE" sort as neighbors by their letters alone. That is what you want for human-facing lists like names and glossary terms; switch it off only when capitalization itself carries meaning, such as code identifiers where "Total" and "total" are genuinely different.
Numbers and accented characters
Because the sort is character based, numbers are ordered as text, not by value. That makes "item10" come before "item2," since the character "1" precedes "2" before the rest of the string is even examined. If you need true numeric order, pad your numbers with leading zeros, for example "item02" and "item10," so the text order matches the numeric order.
Accented letters sort by their character codes too, so depending on the input an accented "é" may not land immediately next to a plain "e." For most lists this is a minor cosmetic effect; if it matters, normalize accents in your source text first so related words group the way readers expect.
Ascending, descending, and removing duplicates
Ascending order runs A to Z and is the default. Descending order, Z to A, simply reverses the comparison and is handy for leaderboards, recency-style lists, or any time you want the end of the alphabet on top. The order toggle applies the same way to all three sort modes.
The Remove duplicate lines option drops repeated entries so only unique lines remain, which is perfect for deduplicating an email list, a tag list, or a set of imported values. Note that duplicate removal matches lines exactly, so "Apple" and "apple" count as two different entries and both are kept; turning on Ignore case changes only the sort order, not which lines are treated as duplicates.
Worked example
Suppose you paste "Cherry", "apple", "Banana", "apple" on separate lines. With Lines, ascending, case-sensitive, you get "Banana," "Cherry," "apple," "apple," because capitals sort first and the duplicate stays. Switch on Ignore case and Remove duplicate lines and you get "apple," "Banana," "Cherry": one of each, in plain alphabetical order.
Now try Delimited Items with a comma on "cherry, apple, banana": the tool returns "apple, banana, cherry" on one line. Same letters, completely different handling, which is why selecting the correct mode before sorting is the most important step.
How this differs from Sort List Alphabetically
Both tools alphabetize, but they target different jobs. This Alphabetical Order tool is the flexible, inline-aware option: it can sort the words inside a paragraph or the items inside a delimited string, in addition to whole lines, and it can remove duplicates. Reach for it when your text is not already a clean one-item-per-line list.
The Sort List Alphabetically tool is line-focused and adds list-specific controls like keeping or removing empty lines, which is ideal when you already have a tidy vertical list. Pick this tool for words and delimited values; pick the list sorter when every item is already on its own line and blank-line handling matters.
Frequently asked questions
Can I sort by lines, words, or comma-separated values?
How do I sort in reverse alphabetical order?
What does the 'Ignore case' option do?
How are numbers and special characters handled?
Can I remove duplicates while sorting, and is my data private?
Related tools
Keep going with these handy tools