Sort lines alphabetically, by natural order so item2 comes before item10, or by length, in either direction. Everything runs in your browser.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
How to use the Line Sorter
- Paste the lines you want to sort into the input panel.
- Pick the ordering: alphabetical, natural, or by line length.
- Choose ascending or descending.
- Click Sort lines, then copy or download the result.
Frequently asked questions
What is natural sort and when do I want it?
Natural sort reads runs of digits as numbers, so item2 comes before item10. Plain alphabetical sorting compares character by character and puts item10 before item2, because the character 1 sorts before the character 2. Use natural order for anything numbered.
Does sorting remove duplicates?
No. Sorting only reorders; every line you put in comes back out. If you want both, remove duplicates first and then sort, so you can see how many lines the de-duplication actually removed.
How are uppercase and lowercase handled?
Alphabetical mode compares without regard to case, so Apple and apple sort together rather than all capitals coming first. That is almost always what people expect from a list of names or terms.
What does sorting by length do with ties?
Lines of equal length keep their original relative order, which makes the result stable and predictable. Sorting by length is useful for finding outliers — the one absurdly long row in a data export usually is the problem.
Are blank lines kept?
Blank lines are dropped rather than clustered at one end, since a run of empties at the top or bottom of a sorted list is never what anyone wants. Use the text cleaner first if you need control over how blank lines are treated.
Can I sort numbers correctly?
Use natural order. A list of plain numbers sorted alphabetically gives 1, 10, 2, 20, 3; natural order gives 1, 2, 3, 10, 20. Natural order handles numbers embedded in text as well, which is why it suits filenames and version strings.
Does my text leave the browser?
No. Sorting happens on your own device and nothing you paste is sent to a server, which means the tool is usable on lists you would not paste into an unknown web service.