Text Sorter
Sort a list of lines alphabetically or numerically, right in your browser.
How to use the Text Sorter
- Paste your list into the box, one item per line.
- Choose a sort order: A-Z, Z-A, or Numeric.
- Optionally ignore case, remove duplicate lines, or skip blank lines.
- The sorted result appears live below, with before/after line counts.
- Click "Copy result" to copy it, or "Clear" to start over.
How it works
A-Z and Z-A sorting use locale-aware string comparison, so accented letters and non-English characters sort where you'd expect them rather than being treated as "greater than" every plain letter. Numeric sort reads the leading number from each line — for example, sorting "Item 9", "Item 10", "Item 2" numerically gives "Item 2", "Item 9", "Item 10", whereas a plain alphabetical sort would incorrectly put "Item 10" before "Item 2" since it compares character by character.
Frequently asked questions
Is my text uploaded anywhere?
No — sorting happens entirely in your browser using JavaScript. Nothing is sent to a server.
How does Numeric sort handle lines that aren't numbers?
Lines that don't start with a recognizable number are sorted to the end, after every line that does contain a number, so your numeric values still come out in the right order.
Does A-Z sort handle accented letters correctly?
Yes — sorting uses JavaScript's locale-aware string comparison, so accented letters (like é or ñ) sort in their expected alphabetical position rather than being pushed to the end.
Can I remove duplicates and sort at the same time?
Yes — check "Remove duplicate lines" and it's applied before sorting, so the result is both deduplicated and ordered.