Text Sorter
Sort lines alphabetically, by length, or in natural numeric order.
About the Text Sorter
Sorting a list sounds trivial until you actually need it done: names for an invitation list, product codes for a catalogue, keywords for an SEO sheet, package names in a config file that a linter insists must be alphabetical. Spreadsheets can sort, but pasting a list into a column, sorting, and copying it back out is five steps for a one-step job. Paste here, pick an order, done.
Beyond the obvious A-to-Z and Z-to-A, two orders earn their place. Natural sort handles numbers inside text the way humans expect: plain alphabetical sorting puts item10 before item2 (because "1" < "2" character-wise), while natural sort reads the digits as numbers and orders item2, item10, item100 correctly — indispensable for file names, version numbers and SKU lists. Length sorting, shortest or longest first, is the quiet favourite of copywriters arranging headline options and developers ordering CSS class names or import lines.
Case-insensitive mode (on by default) prevents the classic surprise where all capitalised words sort before every lowercase word — with it on, "apple" and "Banana" order as a human would file them. The sort is stable: equal lines keep their original relative order. Everything runs locally in your browser, and the result is one click from your clipboard or a downloadable text file. Pair it with the duplicate-line remover before sorting for clean, deduplicated, ordered lists in seconds.
Frequently asked questions
- What is natural sort order?
- An order that treats digit runs as numbers: file2 comes before file10, version 1.9 before 1.10. Plain alphabetical sorting compares character by character and gets these wrong.
- Why do capitalised words sort first without case-insensitive mode?
- Character codes for capitals (A–Z) come before lowercase letters (a–z), so a case-sensitive sort puts "Zebra" before "apple". Case-insensitive mode compares lowercase versions, giving the dictionary-style order people expect.
- Can I sort numbers?
- Yes — use natural order so 9 sorts before 82 and 100. Alphabetical order would sort them as strings: 100, 82, 9.
Related tools
De-duplicate any list while keeping the original order.
Text Diff CheckerCompare two texts line by line and see exactly what changed.
Case ConverterConvert text to UPPERCASE, lowercase, Title Case, camelCase, snake_case and more.
CSV to JSON ConverterTurn spreadsheet CSV data into a clean JSON array.