Sort Lines
Sort lines of text alphabetically, ascending or descending. Free online tool, paste and sort with one click.
Preparing private browser tool…
Frequently asked questions
- Can I sort in reverse (Z to A)?
- Yes. Switch to 'Descending' to sort lines from Z to A or from the largest to the smallest value.
- How does case-insensitive sorting work?
- When enabled, uppercase and lowercase letters are treated as equal, so 'Apple' and 'apple' sort together.
- Does it handle numbers correctly?
- Yes, by default. Natural numeric sorting is on, so item2 comes before item10 instead of between item1 and item3. Turn it off to sort digit runs as plain text.
- Which language rules decide the order?
- Intl.Collator for the page language, so accented Latin, Cyrillic, kana, and Hangul sort the way a reader of that language expects rather than by raw code point.
- What happens to lines that compare equal?
- They keep their input order in both directions. Descending negates the comparison instead of reversing the sorted list, so equal lines do not flip around.