Sort Lines
Sort lines alphabetically, numerically, by length or in reverse. Choose ascending or descending order and optionally ignore case.
Privacy: your input is processed entirely in your browser and is never sent to our servers.
Visual example
Words split on spaces; characters count every keystroke (often including spaces).
How to Use Sort Lines
- 1Paste your list of lines into the text box.
- 2Choose a sort mode and direction.
- 3Press Sort and copy the result.
What This Tool Does
Sorting brings order to exported data, file lists, pasted tables and any text where sequence matters. This tool supports alphabetical sorting for names and words, numeric sorting for figures that string sorting would get wrong, length-based sorting to surface short or long entries first, and reverse sorting to flip any order. A case-insensitive option handles mixed-case lists so "apple", "Banana" and "cherry" sort as you would expect rather than capitals first. The sorted output preserves your line content exactly, only changing the order, and everything runs in your browser so even sensitive lists stay private. Use it to alphabetise a contact list, order product codes, or arrange log entries chronologically once dates are in a sortable format.
Examples
Alphabetising a name list
Paste a list of attendee names and sort them alphabetically, case-insensitive, so the roster reads cleanly from A to Z.
Ordering numeric data
Sort a pasted column of numbers numerically rather than alphabetically, so 2, 10 and 11 appear in the correct order.
Helpful Tips
- Use numeric sort when lines begin with numbers, otherwise they sort as text (10 before 2).
- Reverse sort flips whatever order you chose; it is not a separate mode.
- Sort by length is handy for finding short or long entries quickly.
Frequently Asked Questions
Why do numbers sort wrong?
Alphabetical sort treats numbers as text, so 10 comes before 2. Choose numeric sort instead.
Can I sort descending?
Yes, toggle the direction to descending for any sort mode.
Are blank lines kept?
Yes. Blank lines sort to the top in ascending alphabetical order.