Sort Lines
Sort lines alphabetically, numerically, or by length.
Loading tool…
About this tool
Unsorted lists are hard to scan, hard to compare, and hard to deduplicate. Whether it is a keyword list, a roster of names, or lines from a log file, alphabetical order makes everything findable. This tool sorts your lines with options for ascending or descending order, numeric sorting, and sorting by line length.
Numeric mode sorts 2 before 10 (unlike plain alphabetical sorting), and reverse mode puts Z first. Combine with Remove Duplicate Lines for a clean unique sorted list.
How to use
- Paste your list — one item per line — into the input box.
- Choose alphabetical, numeric, or by-length sorting, plus direction.
- Preview the sorted result live.
- Copy or download the sorted list.
Frequently asked questions
Alphabetical sorting compares character by character, so "10" comes before "2". Numeric sorting detects numbers and orders them by value, so 2 comes before 10. Use numeric mode for numbered lists.
By default it is case-insensitive so "apple" and "Banana" sort naturally together. You can switch to case-sensitive mode if uppercase-first ordering matters to you.
No — sorting only reorders. Run Remove Duplicate Lines first (or after) if you also want a unique list.
It orders lines from shortest to longest (or longest to shortest in reverse), which is useful for finding outliers in data or arranging tags by size.