Sort a list alphabetically, naturally by numbers or by line length. Reverse the order or remove duplicates.
Preparing tool…
No registration · Free to useHow to use Line Sorter
- Place each item on its own line.
- Choose alphabetic, natural numeric, ASCII or length sorting, with optional reverse order and deduplication.
- Review and copy or download the sorted list.
Frequently asked questions
How do I sort item2 before item10?
Choose natural numeric sorting for item1, item2, item10. Ordinary alphabetic order can place item10 before item2. Natural sorting suits numbered filenames and mixed lists.
How does ASCII sorting differ from alphabetic sorting?
ASCII/code-unit order puts digits before English letters and uppercase before lowercase. Locale-aware alphabetic sorting can order casing and Chinese text differently.
Does length sorting use byte length?
No. It compares Unicode code-point counts, not UTF-8 bytes. Joined emoji can have multiple code points; equal-length lines use alphabetic order as a tie-breaker.
Can I combine descending order with deduplication?
Yes. Exact case-sensitive lines are deduplicated first, sorted next and reversed last. Spaces are not automatically trimmed.
Does it sort columns or words inside a line?
No. Each line is one item. Sorting CSV columns, a selected field or individual words within a single line is not included.