What a sorter has to get right
Putting a list in order is one line of code, and nobody opens a web page for one line of code. The time goes on everything around it. Half the rows still carry the bullets they arrived with, three of them are blank, two say the same thing twice, and the paragraph in the middle came out of a PDF with a newline every sixty-six characters. Sort that as it stands and you get an alphabetised jumble with - in front of some of it and a sentence broken across three rows.
- cherry · - apple · - banana → 1. apple · 2. banana · 3. cherry
So this page does the whole job in one pass: it works out where each item really ends, cleans the rows, orders them, and writes the markers back on afterwards — in that order, because any other one gets a different answer. All of it runs in this tab, and nothing you paste is sent anywhere.
Where a line actually ends
A text box wraps for display without putting anything into the text, so a line that merely looks wrapped on screen is already one line here and needs no defending. The kind that does is the other one: text that arrived with real newlines inside its sentences, because it was written in a mail client, copied out of a PDF, or run through a formatter at some fixed width. Those newlines describe a window that no longer exists, and treating each one as an item turns one paragraph into nine bullets.
| Mode | What it does | Reach for it when |
|---|---|---|
| Every line | Starts a new item at every newline, and nowhere else. | The paste is already one item per row and you want no guessing at all. |
| Smart | Folds a hard-wrapped line back into the one above it, and reports how many it folded. | The text came from somewhere that wrapped it — a mail client, a PDF, a terminal, a chat window. |
| Blank lines only | Ends an item only at a blank line, turning every newline inside a paragraph into a space. | The paste is a set of paragraphs and the blank lines are already the boundaries. |
Smart mode is a heuristic, and it is worth knowing exactly when it will act. It first asks whether the text looks hard-wrapped at all: at least two lines within ten characters of the longest one, and that longest line at least forty characters. A short list never passes that test. Neither does one long item among short ones — a long line followed by a short one is indistinguishable from a wrapped line and its tail, so the careful reading wins and both stay separate items.
Once a column has been found, a line is folded into the one above it unless one of three things is true: the line above ended in a full stop, question mark, exclamation mark, ellipsis, colon or semicolon; the line below opens with a bullet or an ordinal, which is a boundary somebody wrote on purpose; or the line above stopped well short of the column, which means the return key was pressed rather than the margin reached.
One case skips all of that. A line ending in a hyphen with a letter in front of it is a word split across the break, so it is always rejoined and the hyphen goes with it. No writer ends a list item on a hyphen.
Because it is a heuristic, it says what it did: the counter under the box reports how many lines were folded and which column it settled on. When it reads the text wrongly, the other two modes are exact, and switching is one click.
Five orders, four ways to compare
Three of the orders compare nothing at all. As typed leaves the rows where they are, reverse turns them back to front, and shuffle draws an arrangement at random — none of them has anything to compare, which is why the key beside them greys out. Only ascending and descending read it.
| Key | Puts in this order | Reach for it when |
|---|---|---|
| Alphabetical | apple, Banana, cherry | The everyday answer: names, words, anything you would look up in a list. |
| Natural | file1, file2, file10 | The lines carry numbers in them — versions, filenames, ticket ids — and plain alphabetical order puts ten before two. |
| Code point | Banana, apple, äpfel | You want the exact Unicode order a program would use, capitals and symbols and all. |
| Length | ant, three, seven!! | You are looking for the outliers — the longest lines in a log, the shortest entries in a glossary. |
None of these read your browser's language settings, and that is deliberate rather than an oversight. Collation data comes from whichever machine is asking, so a list ordered by the host could come back one way on the server and another way in your browser, and the page would have to reconcile a difference it cannot see the cause of. Everything here is compared by code point instead. The cost is real and worth stating: with case sensitivity on, every capital sorts before every lowercase letter, and accented letters land after unaccented ones. The gain is that the same list is the same list everywhere.
Bullets and numbers
The markers go on last, after the ordering. That is not a detail — numbering before the sort would sort the ordinals along with the text and hand back a list whose numbers run 2, 1, 3.
| Style | Example | Reach for it when |
|---|---|---|
| Hyphen | - item | Markdown, a commit message, a code comment — the hyphen is what almost everything renders. |
| Asterisk | * item | Markdown again, where a nested list needs a different marker from its parent. |
| Round bullet | • item | The list is going into a document or a message rather than into a file a parser reads. |
| Task box | - [ ] item | A checklist for GitHub, a pull request description, or anywhere a Markdown renderer draws a tick box. |
| Number | 1. 2. 3. | The ordinary numbered list, and what Markdown expects. |
| Number and bracket | 1) 2) 3) | A legal or academic document, where the bracket form is the convention. |
| Padded number | 01. 02. 03. | The list is long and the numbers should line up down the left edge. |
| Letters | a. b. c. | A sub-list under a numbered one, or a set of options labelled a, b, c. |
| Roman numerals | i. ii. iii. | Front matter, an appendix, or an outline whose top level is already numbered. |
Numbering starts wherever you set it, including at zero — a listing of array indices reads better that way. Roman numerals and letters have no zero and no negatives, so an item numbered below one is labelled with the number itself rather than with an empty marker.
The five cleanup switches
These run before the ordering, on every item the split produced. Four of them are on by default because a pasted list almost always wants them; the fifth changes what counts as the same line.
| Option | What it does | Reach for it when |
|---|---|---|
| Trim spaces | Removes the whitespace at both ends of every item. | Almost always. Leave it off when the indentation is part of what you are sorting — a block of code, for instance. |
| Drop blank lines | Drops items that hold nothing but whitespace. | Almost always. Leave it off when the blank rows are spacing you want to keep. |
| Remove duplicates | Keeps the first of each repeated item and drops every later copy. | A merged list, two exports concatenated, or anything you want a unique set out of. |
| Strip existing markers | Takes off a bullet or an ordinal an item already carries, along with the indentation in front of it. | On by default, and the reason re-listing a list does not produce two markers. Turn it off when the marker is content — a line that genuinely begins with a single initial and a full stop, for one. |
| Case matters | Treats A and a as different characters, both when comparing and when spotting a duplicate. | Sorting identifiers or anything else where the capital carries meaning. Off by default, so a list of names does not put every capitalised word above every lowercase one. |
The order is fixed and worth knowing: markers come off first, then the trim, then the blanks, then the duplicates. Stripping after trimming would leave an indented bullet indented; removing duplicates before trimming would treat a line with a trailing space as different from the same line without one.
What it gets used for
Turning a brain dump into an agenda is the common one: paste the rough notes, drop the blanks, strip whatever bullets came along, sort them, and take back a numbered list. So is tidying a list that was merged from two places — remove the duplicates, sort ascending, and the difference between the two sources is immediately visible.
Then there are the mechanical uses. Alphabetising an environment file or a list of dependencies so a diff stays readable. Sorting filenames with natural order so file2 comes before file10. Finding the longest lines in a log by sorting on length and reading from the bottom. Drawing a name out of a hat with shuffle. And converting a paragraph copied out of a PDF into bullets without first hunting down every stray line break by hand.
Questions people ask
ä sorts after z, and with case sensitivity on every capital comes before every lowercase letter.