Text Sorter
Sort lines alphabetically, numerically, by length or randomly.
How to Use the Text Sorter
Paste your text into the input box above — one item per line — then choose a sort mode. The sorted result appears instantly below.
Sort Modes
- A → Z (Alphabetical) — sorts lines in standard alphabetical order.
- Z → A (Reverse) — sorts lines in reverse alphabetical order.
- Short → Long — orders lines from shortest to longest by character count.
- Long → Short — orders lines from longest to shortest by character count.
- Numeric — sorts lines by their leading numeric value (low to high).
- Random Shuffle — randomises the line order each time.
Options
- Case-sensitive — when enabled, uppercase letters sort before lowercase ("Apple" before "banana"). Disable to ignore case.
- Remove duplicates — eliminates duplicate lines before sorting, keeping only the first occurrence.
Frequently Asked Questions
Does this tool sort my text on a server?
No. Everything runs entirely in your browser. Your text never leaves your device.
How does numeric sort handle lines that are not numbers?
Lines that do not start with a number are treated as 0 and appear at the top of the sorted list.
Can I sort a CSV column with this tool?
Yes, if you paste one column value per line. For multi-column sorting you would need a dedicated CSV tool, but single-column lists work perfectly here.
What does the case-sensitive toggle do?
When enabled, uppercase letters are sorted separately from lowercase (e.g. "Apple" comes before "banana"). When disabled, the sort ignores letter case so "apple" and "Apple" are treated equally.
Does removing duplicates preserve the original order?
Duplicates are removed before sorting, keeping the first occurrence of each line. The remaining lines are then sorted according to the selected mode.
More Text Tools
Word Counter
Count words, characters, sentences, paragraphs and estimate reading time.
Open tool →Case Converter
Convert text between UPPER, lower, Title, Sentence, camelCase, snake_case and more.
Open tool →Lorem Ipsum Generator
Generate placeholder text in paragraphs, sentences or words.
Open tool →Text to Slug
Generate URL-friendly slugs from any text.
Open tool →Text Reverser
Reverse text by characters, words or lines.
Open tool →Character Counter
Count characters with platform-specific limits for Twitter, Instagram and more.
Open tool →