Text Sorter

Paste a list of lines and sort them alphabetically (A–Z or Z–A), by character length, numerically, or shuffle them randomly. Everything runs in your browser — your text is never sent to a server. Perfect for organising keyword lists, to-do items, names and data exports.

0Total lines

How to Use the Text Sorter

Type or paste your list — one item per line — into the input box. Select your preferred sort order from the dropdown, adjust the options and click Sort. The sorted list appears in the output box ready to copy.

  • A → Z — standard alphabetical ascending order.
  • Z → A — reverse alphabetical descending order.
  • Shortest / Longest first — sort lines by character count.
  • Numeric — sort lines as numbers (10 comes after 9, not after 1).
  • Shuffle — randomise the order of all lines.

When to Sort Alphabetically vs by Length

Alphabetical sorting is best for name lists, dictionaries, dropdown menus and navigation items. Length-based sorting is useful when you want to see the shortest or longest items first — handy for meta description lists, keywords or tweet drafts where character count matters.

Combine this tool with the Duplicate Line Remover for a complete list-cleaning workflow: deduplicate first, then sort.

Sorting Numbers in Text

Standard alphabetical sorting treats numbers as strings, so "10" sorts before "2" because "1" comes before "2" in ASCII. Use the Numeric mode to sort numerically. Mixed lists (numbers and text together) will sort numbers first.

Frequently Asked Questions

Can I sort numbers as well as text?

Yes. For numeric sorting (so 10 comes after 9), choose the Numeric option. Standard alpha sort treats numbers as strings.

Does sorting preserve blank lines?

You can opt to remove blank lines before sorting using the checkbox. By default blank lines are removed to keep the output clean.

Is the sort case-sensitive?

You can toggle this. Case-insensitive mode mixes "apple" and "Apple" together. Case-sensitive follows ASCII order where uppercase sorts before lowercase.

Can I randomise the line order?

Yes. The Shuffle option randomises all lines — useful for picking from a list without bias or creating random ordered content.