Five toggles for the four common sort variants
The default sort is case-insensitive ascending with natural ordering. That covers the most-asked-for shape: alphabetise a list of names, requirements, items, or steps, with numbers in numeric order rather than ASCII order. Output is one line per item, matching the input shape.
Four toggles cover the variant cases. Order picks ascending (A to Z) or descending (Z to A). Match Case on flips to ASCII-style sort where uppercase letters precede lowercase (Delta sorts before delta); off groups them together. Natural Sort on (the default) sorts numbers by value so item-2 comes before item-10; off treats the whole line as a string so item-10 sorts before item-2 (because 1 < 2 as characters).
Dedupe on drops duplicate lines (case-insensitive unless Match Case is on). Drop Blank on (the default) removes empty lines from the output. Combine all four for a "clean and alphabetise" pass: paste a messy list, get back a sorted, deduped, blank-line-free version.
How to use sort lines alphabetically
- 1Paste your lines into the input panel, one item per line.
- 2Pick an Order: ascending (A-Z, default) or descending.
- 3Toggle Match Case if your sort needs to be case-sensitive.
- 4Toggle Natural Sort off only if you actually want lexicographic
item-10beforeitem-2. - 5Toggle Dedupe on to drop duplicate lines.
- 6Click Copy to copy the sorted result.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Locale-aware sort via Intl.Collator
Uses the browser's Intl.Collator for the comparison so accented letters and non-ASCII text sort correctly per the user's locale. café sorts near cafe rather than landing among the punctuation symbols at the wrong end of the list.
Natural sort for numbered items
When Natural Sort is on, runs of digits inside lines are compared numerically. chapter-2 sorts before chapter-10; raw lexicographic sort would put chapter-10 first because 1 < 2 as characters. Default on because it matches what users almost always want.
Case-insensitive by default
Default is case-insensitive: alpha, Bravo, charlie sort as alpha, Bravo, charlie in the natural reading order. Turn Match Case on to use ASCII order where capitals come first.
Dedupe + drop blank
Dedupe filters duplicate lines (using the same case rule as the sort comparator). Drop Blank (on by default) removes empty / whitespace-only lines from the output, since they almost always survive paste-from-spreadsheet shenanigans.
Worked example
Default options: ascending, case-insensitive, natural sort. Note item-2 precedes item-10.
charlie alpha bravo item-2 item-10 item-1
alpha bravo charlie item-1 item-2 item-10
Settings reference
| Setting / behaviour | Effect on output |
|---|---|
Order = Ascending (default) |
Sort A to Z. Numbers ascend in natural order if Natural Sort is on. |
Order = Descending |
Sort Z to A. Same comparator, reversed. |
| Match Case = off (default) | Case-insensitive. alpha and Alpha sort together. |
| Match Case = on | Case-sensitive. ASCII order means uppercase precedes lowercase: Delta sorts before delta. |
| Natural Sort = on (default) | item-2 before item-10. Digit runs compare numerically. |
| Natural Sort = off | item-10 before item-2. Raw lexicographic comparison. |
| Dedupe = on | Drops repeat lines. Repeat detection respects Match Case. |
| Drop Blank = on (default) | Empty / whitespace-only lines are removed from the output. |
FAQ
Why does case-insensitive sort group "Alpha" with "alpha"?
How does this compare to dedupe-lines?
What does natural sort do for me?
chapter-2, chapter-10, chapter-3 sort as 2, 3, 10 (natural) rather than 10, 2, 3 (lexicographic). On by default because it matches reader expectation. Turn it off if you genuinely want raw character-by-character comparison.Will it sort emoji or non-Latin scripts?
Intl.Collator which is locale-aware and handles non-Latin scripts correctly. Emoji sort by Unicode codepoint within their block. Mixed-script lists may sort in surprising orders depending on the user's locale.