Sort Text Lines
Put a messy list in order in one click.
About Sort Text Lines
Put a messy list in order in one click. This free text sorter arranges each line A to Z or Z to A, with optional case-sensitive matching and a toggle to drop empty lines. Paste names, URLs, tags, or any one-item-per-line list, pick a direction, and copy the sorted result. Everything runs client-side in your browser; nothing is uploaded.
How to Use Sort Text Lines
- Paste or type your list with one item per line.
- Choose A to Z (ascending) or Z to A (descending).
- Optionally enable case-sensitive sorting or remove empty lines.
- The sorted list appears instantly. Click Copy to grab the result.
Sort Text Lines Examples
A to Z names
"Zoe, Amy, Ben" on separate lines becomes Amy, Ben, Zoe.
Z to A
The same list in reverse alphabetical order: Zoe, Ben, Amy.
Ignore case
"banana, Apple, cherry" sorts as Apple, banana, cherry when case-sensitive is off.
Drop blank lines
Turn on Remove empty lines to strip blank rows before sorting a pasted spreadsheet column.
Read the full guide
How to Use Sort Text Lines: Complete Guide (2026) - 5 min read
Frequently Asked Questions about Sort Text Lines
- What is a text line sorter?
- A text line sorter rearranges each line of your input into alphabetical order. This tool can sort A to Z or Z to A, optionally treat uppercase as distinct, and drop empty lines. It runs in your browser with no signup.
- What is the difference between A to Z and Z to A?
- A to Z is ascending alphabetical order (apple before banana). Z to A is the reverse, so the last letter in the alphabet comes first.
- Does case-sensitive sorting change the order?
- When case-sensitive is off (the default), Apple and apple are treated as the same word for ordering. When it is on, uppercase and lowercase letters are compared as-is, so Banana can sort before apple because B comes before a in character order.
- Are empty lines removed automatically?
- No. Empty and whitespace-only lines stay in the output unless you enable Remove empty lines. With A to Z, blank lines typically sort to the top.
- Does it sort numbers numerically?
- No. Sorting is alphabetical, so 10 comes before 2 because 1 comes before 2 as characters. Prefix numbers with zeros (01, 02, 10) if you need digit lists to line up.
- Is my text sent to a server?
- No. All sorting happens in your browser with JavaScript, so nothing you paste is uploaded, logged, or stored.
Related Tools
Remove Duplicate Lines
Remove duplicate lines from lists, logs, emails, or any multiline text online. Keep the first occurrence, choose case-sensitive matching, and copy the unique lines instantly.
Remove Extra Spaces
Remove extra spaces, double spaces, tabs, and blank lines from any text instantly. Free online whitespace cleaner that trims line ends and normalizes spacing - runs in your browser.
Text Case Converter
Convert text to UPPERCASE, lowercase, Title Case, or Sentence case instantly. Free online case converter for headlines, code, and formatting - runs in your browser, no signup.