Text sorter
Paste any list and sort it the way you need — alphabetically, numerically, or reversed. Options for case-insensitive sort and deduplication included.
About this tool
Sorting text is more opinionated than it looks. The default in almost every programming language is lexicographic ordering by character code, which puts all uppercase letters before all lowercase ones — so Zebra sorts before apple — and orders numbers as strings, so 10 lands between 1 and 2. Both behaviours are correct by the rules being applied and wrong by the expectations of anyone reading the output. Natural sorting fixes the numeric case by comparing digit runs as numbers, which is why file managers show file10 after file9. Locale-aware collation fixes the alphabetical case, and its rules differ by language: Swedish sorts ä after z, German sorts it with a, and Spanish once treated ch as its own letter. For most everyday work — tidying an import list, ordering CSV columns, alphabetising names, ordering log entries — case-insensitive alphabetical or numeric sorting is what you want. This tool sorts pasted lines ascending, descending, or shuffled, with options for case-insensitive and numeric comparison and for removing duplicates in the same pass. It runs in your browser.
- 1
Paste the lines of text you want to sort into the input field.
- 2
Choose ascending (A→Z), descending (Z→A), or random shuffle.
- 3
Optionally enable case-insensitive sorting or numeric sorting.
- 4
Click Copy to copy the sorted output.
Sort a list of names, tags, or keywords alphabetically before pasting into a doc.
Numerically sort log lines that start with counts or IDs.
Reverse-sort a changelog or timestamped list to put the newest entries first.
Sort alphabetically
banana
apple
cherry
dateapple
banana
cherry
dateSort numerically
10
3
25
1
81
3
8
10
25Numbers sort as 1, 10, 100, 2
Cause: String sorting compares character by character, and the character 1 sorts before 2 regardless of how many digits follow it.
Fix: Enable numeric sorting so digit sequences are compared as values. Where the data mixes text and numbers, such as item2 and item10, numeric mode handles the digit runs within each line.
Uppercase entries all cluster at the top
Cause: Case-sensitive sorting orders by character code, and every uppercase ASCII letter has a lower code than every lowercase one.
Fix: Enable case-insensitive sorting. Note that this changes ordering only, not the text itself — the original capitalisation is preserved in the output.
Accented characters sort after z
Cause: Character-code ordering places accented Latin letters in a block above the unaccented ASCII range, so é lands after z rather than beside e.
Fix: For lists with accented text, expect this ordering and adjust by hand, or sort in a tool with locale-aware collation. Which position is correct genuinely depends on the language.
These answers explain common text sorter tasks, expected input formats, and edge cases so both visitors and search engines can understand what this tool does.
What sort modes are available?
Alphabetical (A→Z), reverse alphabetical (Z→A), numerical ascending, and numerical descending. Numerical mode compares the numeric value at the start of each line.
What happens to lines that aren't numbers in numerical sort?
Lines with no leading number are treated as zero and sorted to the beginning of ascending results or end of descending results.
Does case-insensitive sorting change the output text?
No. It only affects the sort order — 'Apple' and 'apple' are grouped together — but the original casing of each line is preserved in the output.
Can I remove duplicates while sorting?
Yes. Enable the Remove duplicates option to keep only the first occurrence of each line after sorting.