Text Sorter
Runs entirely in your browser
Sort lines of text alphabetically, by length, numerically or randomly. Everything happens directly in your browser.
How to use Text Sorter
- Paste your list into the Input box, one item per line.
- Choose a sort order and any extra options.
- Click Sort Lines.
- The sorted result appears in the Output box — copy it with one click.
Features
- Sort A to Z, Z to A, by line length, numerically, or shuffle randomly.
- Optional case-sensitive sorting.
- Optionally skip blank lines or remove duplicate lines while sorting.
- 100% client-side — your text never leaves your browser.
Example
Sorting this list A → Z, with the default case-insensitive option:
banana
Apple
cherry
apple
Blueberry
produces:
Apple
apple
banana
Blueberry
cherry
"Apple" and "apple" sort next to each other because the comparison ignores case by default, and their original relative order is kept since both compare as equal.
Tips for sorting lists
- Numeric sort reads the number at the very start of each line. A line like "5 apples" sorts using 5, but a line like "Item 5" sorts using 0, since the line doesn't begin with a digit — put the number first if you want numeric sort to work as expected.
- Random shuffle produces a new random order every time you click Sort Lines, so click again if you want a different shuffle.
- If you turn off Skip blank lines, empty lines are sorted along with your content — for an A → Z sort, empty lines move to the very top since an empty line always sorts before any text.
- Remove duplicate lines checks the same case-sensitivity setting as the sort itself, so turn on case-sensitive sort first if "Apple" and "apple" should be kept as separate lines.
Is Text Sorter safe?
Yes. Text Sorter reorders your lines locally, using the same leading-digit numeric logic and case rules described above — your list is never sent to a server, and nothing is kept once you close or refresh the tab.
Frequently Asked Questions
What sort orders are available?
You can sort A to Z, Z to A, by line length (shortest or longest first), numerically, or shuffle the lines into a random order.
How does numeric sorting work?
Each line is read as a number (any non-numeric part is ignored) and the lines are ordered from smallest to largest or largest to smallest.
Can I remove duplicate or blank lines while sorting?
Yes. Turn on Remove duplicate lines or Skip blank lines before sorting to clean up the list at the same time.