List Tools

Sort Alphabetically

Sort lines alphabetically, or by the last word for surnames.

PrivateYour text is processed on your device and never uploaded.

Sort Alphabetically is a browser-based text tool on TextToolsBase. Sort lines alphabetically, or by the last word for surnames. To use it, paste or type your text and view the result directly in your browser — no signup and nothing to install.

Advertisements
Input
Result
0 chars · 0 lines
Advertisements

Sorting people by surname means ordering on the last word of each line, not the first.

Sort Alphabetically can order lines by their final word, which is handy for name lists.

How to use Sort Alphabetically

  1. Paste the lines or names you want ordered into the input box.
  2. Turn on sort-by-last-word for names, and Sort Alphabetically orders the lines by that key.
  3. Copy the name-ordered list, or download it as a .txt file.
Advertisements

Use cases

  • Ordering full names by surname.
  • Sorting entries by their final word.
  • Alphabetising a list of names in last-name order.

Good to know

Sort Alphabetically sorts lines with locale-aware comparison and offers a by-last-word option that keys the sort on the final whitespace-separated word of each line, so full names order by surname. It can also remove duplicates.

Frequently asked questions

How does sort-by-last-word work?

Each line is keyed on its final word, so First Last entries are ordered by the Last portion.

What if a line has only one word?

Single-word lines key on that word, so they sort normally alongside multi-word entries.

Can duplicates be removed?

Yes. The dedupe option drops repeated lines so each name appears once in order.

Related List Tools