About the Sort Lines by Length
Sorting by length is useful for finding the longest titles, tidying a list of keywords or arranging CSS selectors. Paste one item per line and choose shortest or longest first.
The sort is stable, so lines of the same length keep their original order, and characters such as emoji are counted as single characters.
How to use the Sort Lines by Length
- Paste one item per line.
- Choose the order.
- Copy the sorted list.
Features
- Ascending or descending
- Stable sort
- Unicode-aware lengths
- Live output
Supported formats
- Plain text
Frequently asked questions
How do I sort alphabetically instead?
Use the Text Sorter for A–Z, Z–A, numeric and natural sorting.
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.
Added · Last reviewed · Maintained by Sohail Khax · How we test tools