How Text Sorter Works
The tool splits your text into lines and reorders them using the rule you choose. Alphabetical sorting compares lines as text, case-insensitively. Length sorting compares the number of characters in each line. Numeric sorting parses each line as a number and compares the numeric values, which is useful for sorting things like prices or IDs that aren't in plain alphabetical order.
How to Use This Tool
- Paste your list into the input box, one item per line.
- Choose whether to sort alphabetically, by length, or numerically.
- Pick ascending or descending order.
- Select Sort and copy the reordered list.
Example
Sorting "10\n2\n33" numerically (ascending) gives "2\n10\n33", while alphabetical ascending sorting of the same list gives "10\n2\n33" because "1" comes before "2" and "3" as text.
Helpful Tips
- Use numeric sort for lists of numbers — alphabetical sort compares digit-by-digit as text and will put "10" before "2".
- Lines that aren't valid numbers are treated as 0 in numeric mode, so mixed text-and-number lists may need cleaning first.
- Length sorting is handy for finding the shortest or longest entries in a list of names, tags or URLs.
Frequently Asked Questions
Is alphabetical sorting case-sensitive?
What happens with numeric sort if a line isn't a number?
Can I sort a list of prices with dollar signs?
Does sorting remove duplicate lines?
This tool runs entirely in your browser. Your input is not uploaded to any server.