Sort alphabetically, numerically or by length. Your text never leaves your browser.
Sorting options
- A → Z / Z → A: alphabetical order using your browser's Unicode collation.
- Natural number order:
item 2 comes before item 10. Untick it for strict character order. - Shortest / longest first: compares the number of characters, including spaces.
- Reverse order: flips the list without comparing anything — handy for turning newest-first into oldest-first.
Quicker than a spreadsheet
For a short list of names, tags or bullet points, opening Excel or Google Sheets just to sort is overkill. Paste, pick an order and copy. To drop repeats first, run the list through Remove Duplicate Lines.
How this tool calculates
- Lines are compared with the browser's Intl.Collator. Japanese and Traditional Chinese pages use that language's sorting rules, while the other pages use Korean collation.
- With "numeric" on, 2 comes before 10; with it off lines are compared as text so 10 comes before 2. "Ignore case" treats upper and lower case as equal.
- The sort is stable, so lines with equal values keep their original order. Sorting by length compares the number of visible characters, and reverse simply flips the line order.
Worked example
Sort the seven lines "10", "2", "1", "B", "a", "나", "가" in ascending order and you get "1 10 2 가 나 a B" with numeric off and "1 2 10 가 나 a B" with numeric on. In Korean collation Hangul comes before Latin letters, and with ignore case off "a" comes before "B". These values come from running this tool's own functions.
Things to know before you use it
- Under Korean collation, Hangul sorts before Latin letters. If you want Latin first, split the list and sort the parts separately.
- With "remove blank lines" on, blank lines disappear from the result and are added to the removed count.
- Your original stays in the input box, so just copy the result. An item that contains a line break is treated as separate lines.