Sort Text Lines
Sort lines alphabetically, numerically or reverse — case-sensitive or not.
Sort lines of text any way you need
The Sort Text Lines tool reorders a block of text line by line: alphabetically A to Z or Z to A, numerically for lists of numbers, or in reverse. You can choose whether the sort is case-sensitive, so Apple and apple group the way you expect. It is the fastest way to alphabetize a list, order a set of values, or tidy a column of data without opening a spreadsheet.
How it works
Sorting runs locally in your browser with JavaScript. The tool splits your input into lines and applies the comparison you pick — lexical, numeric, or reversed — then rejoins them. Numeric mode compares values as numbers rather than text, so 2 comes before 10. Because nothing is uploaded, you can order private lists, exports, or code without any of it touching a server.
Practical use cases
- Alphabetize a list of names, tags, or imports.
- Sort numeric IDs or values in true numeric order.
- Reverse a list to flip its order in one click.
- Prepare an ordered list before diffing or importing it.
Combine it with Remove Duplicate Lines to sort and dedupe together, Find and Replace to clean values first, or Reverse Text when you need character-level reversal instead of line order.
Private by design
All processing happens in-browser, so no data is uploaded and nothing is stored. The tool is free, requires no account, and works on all modern browsers including mobile. Close the tab and your list disappears completely.
Frequently asked questions
You can sort alphabetically ascending or descending, numerically, or reverse the current order, with an option for case-sensitive comparison.
Related tools
Text Diff Checker
Compare two blocks of text and highlight every difference line by line.
Case Converter
Convert text between camelCase, snake_case, kebab-case, Title Case and more.
Word & Character Counter
Count words, characters, sentences, lines and reading time as you type.
Slug Generator
Turn any title into a clean, URL-safe slug for pages and posts.