Skip to content
T
Tools.Town
Free Online Tools for Everyone
A → Z

Text Sorter

100% Free

Sort lines five ways — alphabetical, natural (item2 < item10), length, numeric, random shuffle. Reverse, case toggles, blank-line handling.

Real-time
Client-Side
5 modes
Sort mode
Sorted (0 lines)
Sorted output appears here…

Embed This Tool

Easy to Embed

Add Text Sorter to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/text-sorter/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title="Text Sorter">
</iframe>

Share This Tool

Share Instantly

Share Text Sorter with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Paste lines (one item per line) into the input
  2. 2 Pick a sort mode — alpha, natural, length, numeric, or random
  3. 3 Toggle reverse, case-sensitivity, and blank-line removal
  4. 4 Random mode includes a re-shuffle button for new orderings
  5. 5 Copy the sorted output

Features

  • Five sort modes for different data types
  • Natural sort understands embedded numbers (item2 before item10)
  • Locale-aware alphabetical sort via String.localeCompare
  • Reverse + case toggles
  • Random Fisher-Yates shuffle with re-shuffle button
  • Removes blank lines by default

Why it Matters

Sorting a list shouldn't require opening Excel. The natural-sort mode in particular handles versioned files ('v1', 'v2', 'v10') and numbered items correctly — something Bash `sort` only does with `-V` and Excel doesn't do at all without a custom column.

★★★★★

Use Cases

Bibliography / Reference

Alphabetise a list of citations or references

Version List

Natural-sort 'v1, v2, v10' correctly (alpha would put v10 between v1 and v2)

Random Picker

Shuffle a list to randomise order (e.g. team draws)

Frequently Asked Questions

Why does default alpha put 'item10' before 'item2'?
Plain alphabetical sort is character-by-character — '1' < '2'. Use 'Natural' mode if you want numerically aware sorting.
Is the random shuffle truly random?
It uses Math.random — pseudo-random, not crypto-secure. Fine for fun shuffles; for cryptographic randomness use the Password Generator's secure mode.
What does 'numeric' mode do with non-numeric lines?
They sort to the end (treated as 'larger'). The first parsed number on each line is used as the key.

Related Tools You Might Like

Browse more free tools