Sort Lines Alphabetically
Paste any list and sort it alphabetically, numerically, or by line length — with options for case sensitivity and whitespace.
Runs entirely in your browser — your text is never uploaded
Result · 0 lines
How to use Sort Lines Alphabetically
- Paste your lines into the input.
- Choose a sort order.
- Toggle ignore case, trim lines or remove blanks as needed.
- Copy the sorted result.
Examples
Input
banana / apple / cherry
Result
apple, banana, cherry
Input
10 / 2 / 33 (numeric)
Result
2, 10, 33
What you can type into Sort Lines Alphabetically
- A–Z and Z–A
- Character-by-character comparison, so "10" sorts before "2" and capital letters may group separately unless you ignore case.
- Numeric
- Reads the first number found in each line and sorts on its value, which is what you want for prices, IDs and measurements.
- By length
- Sorts by number of characters, a fast way to spot an oddly long line that is really a formatting error.
- Trim, ignore case, remove blanks
- Applied before sorting, so they change how lines compare as well as what appears in the output.
How the results behave
- Lines without a number
- In numeric sorting they are grouped at the end in their original order rather than dropped.
- Duplicates are kept
- Sorting never removes anything. Run the duplicate remover first if you need a unique list.
Tips
- Ignore case is usually right for prose lists; leave it off when capitalisation is meaningful, such as in code identifiers.
- Sorting by length descending is a quick quality check on any exported list.
Common mistakes
- Using A–Z on numbered lines and being surprised that 10 precedes 2.
- Expecting the sort to clean the list — trim and remove blanks have to be switched on.
About the sort lines alphabetically
Anyone ordering a list for a report, a glossary, a checklist or a data export before pasting it somewhere else.
Alphabetical sorting compares text character by character, which means “10” sorts before “2”. Numeric sorting reads the leading number in each line instead, which is what you usually want for measurements, prices and IDs.
Sorting by length is a quick way to spot outliers in a list — an unusually long line is often a formatting mistake.
Accuracy and limitations
- Ordering follows your browser's locale rules, so accented characters may sort differently on different devices.
Frequently asked questions
Does sorting remove duplicates?
No. Use the remove duplicate lines tool first if you want a unique, sorted list.
How are non-numeric lines handled in numeric sort?
Lines without a number are grouped at the end in their original order.
Related tools
Remove Duplicate Lines
Deduplicate a list of lines with full control over matching.
Open toolCase Converter
Convert text to upper, lower, title, sentence, camel, snake or kebab case.
Open toolWord Counter
Count words, characters, sentences, paragraphs and reading time.
Open toolSentence Counter
Count sentences and see average sentence length.
Open tool