Text Tools
Sort lines of text
Alphabetical, natural, by length, or random. Ascending or descending.
- Free, no signup
- No upload — runs on your device
- No watermark
- Unlimited use
Sort Lines
Processed locallyAlphabetical sorting puts file10 before file2
A plain alphabetical sort compares strings character by character, so file10 sorts before file2 because 1 precedes 2. This is correct string ordering and completely wrong for anything a human numbered. Version numbers, chapter headings, invoice references and photo filenames all suffer from it.
Natural sort recognises runs of digits and compares them as numbers, so file2 precedes file10. It is what file managers do, what people expect, and what plain sorting never gives you. This tool uses the browser's own Intl.Collator with numeric collation, which also handles accented characters correctly — é sorts next to e, not after z.
The one place plain alphabetical wins is when the output feeds a system that will do a string comparison itself. Match the sort to what happens downstream, not to what reads nicely.
How it works
- Paste your list
- Choose a sort mode and direction
- Copy the sorted result