In this article
Alphabetical order basics
Simple alphabetical sorting compares text character by character. That works for plain words, but creates three classic surprises:
- Numbers inside text: “item 10” comes before “item 2”, because “1” is before “2”.
- Capitals: some tools put all capitalised words before lowercase ones.
- Accents: “Émile” may end up after “Zara”.
Natural sort fixes numbers
Natural order reads numbers as numbers, so you get item 1, item 2 … item 10. It is how people expect file names, chapter lists, versions and room numbers to be ordered. The Sort Lines tool uses your browser’s language-aware rules, so accented letters sit next to their plain versions too.
Which sort for which list
| List | Best order |
|---|---|
| Names, guests, students | A → Z (case-insensitive) |
| Files, chapters, versions | Natural |
| Prices or scores in each line | By number in the line |
| Short phrases first (e.g. for tags) | Shortest first |
| Presentation order, raffles | Shuffle randomly |
| Newest first instead of oldest | Reverse current order |
How to sort
- Paste your list into Sort Lines, one item per line.
- Choose the order.
- Tick “Remove duplicates” if needed; keep “Trim spaces” and “Remove empty lines” on for lists copied from spreadsheets.
- Copy the sorted list.
Sorting surnames
To sort people by surname when the list says “Ali Khan”, flip the names first. With Find and Replace using regex, find ^(\S+) (\S+)$ and replace with $2, $1 to get “Khan, Ali” – then sort.
Fair random order
For raffles, team picks and presentation order, the shuffle uses your device’s secure random number generator and the Fisher–Yates method, which gives every possible order an equal chance. For a public draw, shuffle in front of everyone or share your screen so the result is trusted.
Sorting other languages
Alphabetical order differs between languages: in Swedish, “Ä” comes after “Z”; in Spanish dictionaries, “ñ” follows “n”. The tool follows your browser’s language rules, which suits most lists. Urdu and Arabic words are sorted by their own alphabet order. If a list mixes scripts, each script is grouped together, which is usually what readers expect.
Sorting in spreadsheets vs here
Spreadsheets sort columns well, but a quick list in an email, a chat or a document is faster to paste here. Copy one column from Excel or Google Sheets, sort it, and paste it back.
Numbering after sorting
Need a numbered list once it is in order? Paste the sorted list into a word processor and apply numbering, or use Find and Replace to add a dash or bullet to the start of every line with the pattern ^. Keep the numbers out of the list while sorting – otherwise “10. Zainab” sorts by the number, not the name.
Clean before you sort
- Remove stray spaces and invisible characters with Remove Extra Spaces.
- Make capitals consistent with the Case Converter.
- Compare two sorted lists with Text Compare to see what is missing.