Text Cleanup Tools › Lists and lines
Sort Lines
Put a list in order: alphabetical, by line length, or by number.
Processed on your device. Nothing is uploaded or stored on a server.
How it works
- Paste a list with one item per line.
- Choose how to sort and whether to reverse the order.
- Copy the sorted list.
Example
banana Apple cherry apple pie Date
Apple apple pie banana cherry Date
What this tool does
Alphabetical sorting uses your browser's locale-aware comparison, so accented letters sort sensibly rather than after Z. With "Ignore case" on, Apple and apple sort together instead of capitals jumping to the top. Number sorting reads the number at the start of each line, so 9 comes before 10 and 100, which a plain alphabetical sort gets wrong. Length sorting is useful for finding the shortest or longest items in a list. After sorting, you can remove duplicates in one more step.
Common problems
Numbers sort as 1, 10, 2
That is alphabetical order. Choose "Number at the start of the line".
Capital letters come first
Turn on "Ignore case" so Apple and apple are compared by letters only.
Questions
Does it sort accented names correctly?
Mostly yes, using your browser's locale rules. Exact ordering can differ by language and browser.
Can I sort a CSV by its first column?
Yes, if the first column is what the line starts with. It sorts whole lines, not columns inside them.
How do I reverse a list without sorting?
This tool sorts first. Sort with descending turned on if a reverse order of sorted values is what you need.
Related tools
Last reviewed 2026-10-14.