Sort Lines
Alphabetical / reverse / natural
200 3 30 apple banana file-1.txt file-10.txt file-2.txt Zebra
What is Sort Lines?
Sort a list of lines alphabetically, numerically (natural sort — so "file-10" comes after "file-2"), by length, reversed, or shuffled randomly. Options include ignore-case and drop-empty-lines. Useful for tidying CSV headers, ordering a bibliography, randomising quiz items, or preparing input for diff tools.
How do I use Sort Lines?
- Paste lines into the input panel.
- Choose a sort mode — alphabetical, natural, length, reverse, or shuffle.
- Toggle descending / ignore case / drop empties as needed.
- Copy or download the sorted output.
When should I use Sort Lines?
Sort Lines is for line-based ordering. To remove duplicates rather than just sort, use Dedup Lines — or chain them (sort first, then dedup) for a clean, sorted, unique list.
Does the sort handle numbers correctly?
Pick "Natural sort" to get 1, 2, 10 instead of 1, 10, 2. Default alphabetic sort treats numbers as strings.
Can I sort by length or reverse order?
Yes. Options include alphabetic, reverse alphabetic, length (short to long), length (long to short), natural, and random shuffle.
Is the sort case-sensitive?
By default, yes — uppercase letters come before lowercase. Toggle "Ignore case" to sort insensitively.
Is my file uploaded anywhere?
No. Everything runs in your browser. Your files never leave your device, and there is no server component for this tool.