What does this tool do?
Text Sorter is a free tool that takes your text line by line and reorders it by the criterion you choose. Sort lists alphabetically (A→Z or Z→A), by length, by numeric value, or shuffle them randomly. It is handy for anyone working with lists of names, words, or data rows.
How to use it
- Paste your text into the input area.
- Adjust the options to fit your needs.
- Copy the processed text.
Clean your list while you sort
The tool does more than reorder lines; it can tidy the list at the same time. 'Remove duplicates' collapses identical lines to one, 'Remove blank lines' strips empty rows, and 'Trim whitespace' clears stray spaces at the start and end of each line. With 'Case sensitive' off, 'Apple' and 'apple' count as the same entry. Combining these options lets you clean and sort a messy list in a single pass.
Length, numeric, and shuffle modes
Besides alphabetical order, 'Shortest first' and 'Longest first' arrange lines by character count, breaking ties alphabetically. 'Numeric' mode reads the number at the start of each line and sorts by its real value, so line 2 comes before line 10 instead of after it. 'Shuffle' randomizes the order, which is useful for drawings, picking a sequence, or sampling entries from a list.
Frequently asked questions
How does numeric sorting handle lines with text?
Numeric mode reads the number at the beginning of each line. If a line does not start with a number that value is treated as invalid, so it works most reliably on lists of pure numbers.
How does case sensitivity change the sort?
When off, comparisons are made in lowercase, so 'Zebra' and 'apple' fall into natural alphabetical order. When on, uppercase letters sort before lowercase ones.
Does shuffle give a different result each click?
Yes. Shuffle uses the Fisher-Yates method to produce a fresh random order every time, giving you an unbiased mix.
Is Text Sorter free?
Yes. Text Sorter and all 300+ tools on MagmaNex are completely free with no signup or account required.
Is my data safe?
Yes. Everything runs locally in your browser. The data you enter is never sent to a server, stored, or shared.
Does it work on mobile?
Yes. Text Sorter works on phones, tablets and desktops — no app download needed.
🔒 Privacy: everything runs in your browser, your data is never sent to a server.
