Sort Lines Alphabetically
Paste a list, one item per line, and sort it A to Z or Z to A. Sort numbers naturally, sort by line length, reverse the list or shuffle it. It runs in your browser and your text is never uploaded.
Your list
Options
Result
How to sort lines alphabetically
- Paste your list into the box, one item per line.
- Pick an order: A to Z, Z to A, by length, reversed or shuffled.
- Set the options, then press Copy result.
How lines are sorted
Lines are compared with your browser's alphabetical rules, so accented letters sit next to their plain forms. With Natural numbers on, item2 comes before item10, which is what most people expect from a list. Switch to Plain text to compare one character at a time. Ignore case is on by default, so Apple and apple sort together. Sorting by length puts lines of the same length in A to Z order.
Related tools
Clean up a list with the remove duplicate lines tool, change the case of text with the case converter, or count words and lines with the word counter.
See also
- Clean up a list with the remove duplicate lines tool.
- Change the case of text with the case converter.
- Count words and lines with the word counter.
Frequently Asked Questions (FAQ)
Paste your list into the box, one item per line, and leave the order on A to Z. The sorted list appears straight away. Press Copy result to put it on your clipboard.
Choose Z to A under Order. The same list is shown in reverse alphabetical order.
A plain sort compares one character at a time, so 1 comes before 2 and item10 lands before item2. This tool sorts naturally by default, so item2 comes before item10. Switch Numbers to Plain text if you want the character by character order.
Not by default, so Apple and apple sort together. Untick Ignore case to make capital and small letters count as different, so both are kept when removing duplicates.
Yes. Choose Shortest first or Longest first. Lines of the same length are put in A to Z order.
Yes. Reverse flips the current order of your lines. Shuffle puts them in a random order, and pressing Shuffle again gives a new one.
Yes, tick Remove duplicate lines. For more control, such as keeping the last copy, use the remove duplicate lines tool.
No. The tool runs in your browser and your text never leaves your device.