Text Sorter

Sort a list of lines alphabetically, numerically or by length.

Sorting options

A guest list of two hundred names, pasted in the order people RSVP’d, is useless at the door. Sort it alphabetically once and it becomes a list someone can actually work from.

More than one way to sort a list

Alphabetical order is the obvious default, but it is not always the right one. A list of prices needs a numeric sort, where 9 correctly comes before 10 — something a plain alphabetical sort gets wrong, since it would read 10 as starting with the character 1 and place it before 9. A list of usernames or file names might need a length sort, shortest first, to spot outliers quickly.

Case sensitivity is the other decision that changes results. A case-sensitive sort places every capital letter before every lowercase letter in standard ASCII order, so Zebra sorts before apple. Most people expect a case-insensitive sort instead, which treats Zebra and zebra as equivalent for ordering purposes.

Sort types and when to use them

Sort typeBest forExample result
Alphabetical A-ZNames, tags, general text listsApple, Banana, Cherry
Alphabetical Z-AReverse lookups, recency-style listsCherry, Banana, Apple
NumericPrices, quantities, IDs2, 9, 10, 21
Length (shortest first)Spotting short or truncated entriesID, Name, Address
Random shuffleAssigning random order fairlyvaries each run

Sorting a list

  1. Paste your list, one item per line.
  2. Pick the sort type — alphabetical, numeric, or by length.
  3. Choose ascending or descending order.
  4. Turn on duplicate removal if your source list might have repeats.
  5. Sort, then copy the ordered list back out.

Removing duplicates while you are at it

Sorting is also the easiest moment to catch duplicates, because once a list is ordered, identical entries sit right next to each other and become obvious at a glance — or you can let the tool strip them automatically before the final output. This is genuinely useful for merging two exported contact lists or cleaning a list of email addresses collected from multiple forms.

Text sorter questions

Why does my numeric list sort wrong when I use alphabetical order?

Alphabetical sorting compares text character by character, so 10 is read as starting with 1 and placed before 9. Switch to numeric sorting, which compares the actual values instead of their characters.

Can I sort by the length of each line?

Yes, choose the length sort option, and set it to ascending for shortest-first or descending for longest-first. This is useful for spotting unusually short or long entries in a list.

Does sorting remove duplicate lines automatically?

Only if you enable that option. Sorting and deduplication are separate settings, since sometimes you want duplicates kept and simply grouped together, and sometimes you want them gone.

Is sorting case-sensitive by default?

Most sorters, including this one, default to case-insensitive so that “Apple” and “apple” are treated the same for ordering. A case-sensitive option is usually available if you need strict ASCII order instead.

Can I shuffle a list into random order instead of sorting it?

Yes, a random shuffle option produces a fresh random order every time you run it, which is useful for randomly assigning seating, raffle order or task order fairly.

Cookie
We care about your data and would love to use cookies to improve your experience.