Sort Lines
This free line sorter brings order to any list you paste — alphabetize name lists, sort log lines by length to spot anomalies, or put numbers in true numeric order instead of the lexicographic mess that puts 10 before 2.
How to use
- Paste your list into the editor below, one entry per line.
- Pick a mode: alphabetical A-Z or Z-A, by length, or numeric ascending / descending.
- Optionally enable ignore case, dedupe, or reverse the final order.
- Copy the sorted result from the preview; it updates live as you type.
Frequently asked questions
Why does numeric sorting exist alongside alphabetical?
Plain alphabetical comparison is character-by-character, so it orders numbers as 1, 10, 2, 3. Numeric mode reads each whole line as a number and orders it by value: 1, 2, 3, 10. Use numeric whenever your lines are amounts, sizes or IDs.
What happens if a line is not a number in numeric mode?
The tool reports an error naming the first offending line rather than guessing. Silent fallback would produce a confidently wrong order, so numeric mode requires every line to be numeric.
How does length sorting break ties?
Lines of equal length fall back to alphabetical order, so results are stable and predictable. This mode is handy for spotting outliers in logs or finding the shortest entries in a list.
Does sorting modify my original lines?
No. Lines are compared as-is (with optional case-insensitive comparison) and your text is never trimmed, rewritten or reformatted — only the order changes.
Related tools
About this tool
This free line sorter brings order to any list you paste — alphabetize name lists, sort log lines by length to spot anomalies, or put numbers in true numeric order instead of the lexicographic mess that puts 10 before 2. Five modes cover the everyday cases: alphabetical A to Z, alphabetical Z to A, shortest line first, numeric ascending and numeric descending. Three switches refine the result: ignore case compares letters without regard to capitalization while keeping your original text intact, dedupe removes repeated lines before sorting, and reverse flips the final order with one click. Numeric mode is strict on purpose — if any line is not a number the tool tells you which line failed instead of quietly producing a wrong order, because a silently mis-sorted ledger is worse than an error message. Everything runs locally in your browser as you type: nothing is uploaded, nothing is stored, and the sorted preview updates instantly whenever you change the text or the options.