About this tool
Sorts a block of text one line at a time — alphabetically by default, or numerically when a line's leading value is a number. Useful for tidying lists that arrived in no particular order: exported data, a list pasted from a spreadsheet, or notes collected over time.
How to use the Line Sorter
- Paste your list, one item per line.
- Choose ascending or descending, and enable numeric sort if your lines are mostly numbers.
- Click "Sort lines" and copy the result.
Common use cases
- Alphabetizing a list of names, tags, or file names before pasting them somewhere that expects order
- Sorting a list of scores, prices, or IDs numerically instead of as text
- Cleaning up an export where rows arrived in insertion order rather than a useful one
- Combining "sort" with "remove duplicates" to both order and deduplicate a list in one pass
Worked example
A plain alphabetical sort compares text character by character, so "10" sorts before "9" because "1" comes before "9" as a character — the same reason "Item 10" would sort before "Item 2" in a text sort. Enabling Numeric sort fixes this for lines that are purely numbers (or start with one): each line is compared by its actual numeric value first, so 2, 9, and 10 sort in that order rather than 10, 2, 9. Lines that aren't numbers fall back to a normal text comparison and are sorted after any numeric lines.
Things to watch out for
Case-insensitive sorting affects comparison only — the original capitalization of each line is kept in the output. Numeric sort looks at what a line starts with using standard decimal parsing, so a line like "42 items" is treated as the number 42, but a line like "Room 42" is not (since it doesn't start with a digit) and is sorted as text instead. If you need "Room 42" and "Room 9" to sort numerically by their trailing number, this tool won't do that — it only reads a leading numeric value.
Frequently asked questions
Only at the start. A line is treated as numeric if it begins with a valid number (like "42 items"); lines that don't start with a number, such as "Room 42", are sorted as plain text instead.
No. "Case-insensitive" only affects how lines are compared during sorting — the text of each line in the output is exactly what you pasted in.
With "Skip blank lines" enabled (the default), empty lines are removed before sorting. Uncheck it if you want blank lines kept and sorted in along with everything else, alphabetically that means they'll sort first.