How to use it
- Paste your text
Type, paste, or drop a .txt file into the editor. Long documents are fine.
- Pick an order and sort
A to Z, Z to A, natural, by length, reversed or random. Empty lines are dropped unless you keep them.
- Copy or download
Copy the result, download it as a .txt file, or press Undo to go back a step.
Alphabetical is harder than it looks
A simple computer sort compares character codes, so Zebra comes before apple and Éclair lands after z. This tool uses your browser's language-aware collation (the Unicode Collation Algorithm), so upper and lower case sort together, accented letters sit next to their base letter, and Arabic follows the order of the Arabic alphabet, with أ and إ next to ا.
Natural order
In plain alphabetical order, file 10 comes before file 2 because the character 1 is smaller than 2. Natural order reads the numbers as numbers: file 1, file 2, file 10. Use it for chapters, file names, invoice numbers and versions.
Other orders
- By length: shortest first (or longest first), ties broken alphabetically. Handy for finding the longest titles or keywords.
- Reverse: flips the current order, last line first, without sorting.
- Shuffle: a fair random order (Fisher–Yates), for drawing names, quiz questions or test data.
Add to each line and number lines
"Add to each line" puts text before and after every non-empty line, for example quotes and a comma to turn a list into SQL 'a', values, or - to make a Markdown list. "Number lines" adds 1., 2., 3. Duplicates in the list? Remove them first; lines broken across rows? Join them.