Text Sorter
Alphabetize, sort by length, reverse or shuffle lines
About the Text Sorter
Getting a list into order — alphabetizing names, grouping lines by length, or randomizing draw entries — is one of those jobs that is tedious manually and trivial for a computer. This Text Sorter reorders the lines of whatever you paste with a single click per action.
It treats each line as an item and offers six operations: sort A–Z or Z–A, sort by length (shortest or longest first), reverse the current order without sorting, and shuffle randomly using the Fisher–Yates algorithm for an unbiased mix. Two options refine the result — a case-insensitive sort so capitalization does not scatter related words, and a remove-blank-lines toggle to drop empty rows first. Teachers randomizing a roster, writers alphabetizing a glossary, and anyone ordering a bibliography use it the same way.
Each action rewrites the same box, so you can stack them: remove blanks, sort A–Z, then reverse — and a line counter keeps track of how many entries you are working with.
How to Use the Text Sorter
- Paste your list into the box, one item per line.
- Set the options — case-insensitive sort and remove blank lines — to taste.
- Click an action: A → Z, Z → A, Length ↑, Length ↓, Reverse, or Shuffle.
- Copy the reordered list with the Copy button.
Why Use ToolForge’s Text Sorter
- Six ordering operations in one place cover alphabetical, length-based, reversed, and randomized needs without a spreadsheet.
- Shuffle uses a proper Fisher–Yates algorithm, so every arrangement is equally likely — important for fair random draws.
- Alphabetical sorting is locale-aware via localeCompare, so accented and international characters order sensibly.
- Everything happens in your browser, so your list stays private and the result is instant.
Frequently Asked Questions
What is the difference between Reverse and Z → A?
Z → A sorts the lines into reverse alphabetical order. Reverse simply flips the current order of the lines as they are, without sorting — so if your list is already in a custom order, Reverse mirrors it while Z → A would alphabetize it backwards.
Is the shuffle truly random?
Yes. It uses the Fisher–Yates shuffle, which produces an unbiased permutation where every possible ordering is equally likely — unlike naive sort-by-random tricks that can skew the results.
How does case-insensitive sorting change the result?
With it on, "apple" and "Apple" sort next to each other instead of all capitalized words being grouped before lowercase ones. Turn it off if you specifically want uppercase entries ordered separately from lowercase ones.
