Text Sorter
Text Sorter
Sort lines alphabetically, numerically, or reverse.
Runs entirely in your browser
How to use this tool
- Fill in the inputs.
- Read the result.
- Copy or download as needed.
About the Text Sorter
The Text Sorter rearranges a list of lines into alphabetical order (A to Z or Z to A), numerical order (ascending or descending), or simple reverse order, with an optional setting to remove duplicate lines at the same time. Paste your list, choose a sort mode, and get an instantly reorganized result you can copy or download.
This is useful for organizing names, tidying up exported data, ranking numeric values, or simply reversing the order of a list without retyping it manually.
Alphabetical sorting (A→Z and Z→A) uses locale-aware string comparison, which correctly orders text according to standard alphabetical rules, including handling of accented characters and case differences in a natural way. Numerical sorting (ascending and descending) extracts a numeric value from the start of each line and orders lines based on that number — lines where no valid number can be found are treated as zero for sorting purposes, so it works best on lists where every line begins with a number.
Reverse order simply flips the current order of the list from bottom to top without applying any alphabetical or numerical logic. When "remove duplicates" is checked, it runs before sorting: any line that is an exact repeat of an earlier line is dropped from the list before the chosen sort order is applied.
Common use cases
- Alphabetizing a list of names, product titles, or file names for a report or directory.
- Sorting a list of numeric measurements or scores from highest to lowest or lowest to highest.
- Reversing the chronological order of a pasted list, such as log entries or a timeline.
- Cleaning and sorting a list of keywords or tags in one step by combining deduplication with alphabetical order.
- Preparing a sorted list for import into another tool, spreadsheet, or database.
Tips and best practices
- For numerical sorting to work correctly, make sure each line starts with the number you want to sort by — text before the number can cause it to be treated as zero.
- Combine the "remove duplicates" option with any sort mode to both clean and organize your list in a single pass.
- Alphabetical sorting is case-aware by default; if you need strictly case-insensitive alphabetical order, converting your text to a single case first with the Case Converter can help.
- Use "reverse order" when you simply want to flip a list's existing sequence without reordering it by value, such as reversing a chronological log.