Writing Tool
Text Sorter
Paste a list and put it in order — A–Z, by length, natural order that understands numbers, or a proper shuffle. Clean blanks and duplicates, then copy or download. Everything stays in this browser.
- A–Z & Natural
- De-duplicate
- TXT / CSV
- Local only
- Free
Input
Sorted result
How it works
- Paste a list, drop a text file, or load a sample. One item per line is the default.
- Pick A–Z, length, natural order, or shuffle. Natural order is the mode that puts
item2beforeitem10. - Turn on clean-up if you need it: trim, drop blanks, remove duplicates, ignore case, or sort by last word.
- Copy the result, or download it as
.txtor a one-column.csv.
The output updates as you type. There is no Sort queue and nothing leaves this page.
Sort modes
Standard alphabetical order. Case Insensitive keeps Apple and apple together without rewriting either line.
Orders by character length. Equal lengths fall back to A–Z so the list stays stable.
Compares number runs as numbers. Filenames, versions and numbered headings come out the way a person would read them.
A Fisher–Yates shuffle — every item is equally likely to land in any position. Reverse then just flips that permutation.
Why natural sort exists
A plain alphabetical sort compares one character at a time. That is why
item10 jumps in front of item2: the 1 is smaller than
2, and the extra 0 never gets a chance. Spreadsheets do this unless
you convert the column to numbers, which you cannot do when the number sits inside a filename.
Natural sort splits each line into number runs and text runs, then compares numbers as
integers. item2 becomes “item” + 2, item10 becomes “item” + 10, and
2 comes first. Load the Files sample to see it.
What each option does
| Option | Effect |
|---|---|
| Case insensitive | Compare in lowercase. The original spelling is kept. |
| Remove blank lines | Drop empty items after trim. |
| Remove duplicates | Keep the first time a line appears. Case fold applies if Case insensitive is on. |
| Trim whitespace | Strip leading and trailing spaces before compare and before output. On by default. |
| Reverse result | Flip the finished list. Works after any mode, including shuffle. |
| Ignore numbers | Strip digit runs before compare, so a2 and a10 tie. |
| Ignore punctuation | Strip marks such as . ! ? before compare. |
| Sort by last word | Compare the last whitespace-separated token. Use this for “First Last” name lists. |
Who this is for
Clean a pasted outline, a list of headings, or a dump of tags before it goes into a post.
Order filenames, env keys, or CSV columns without opening a spreadsheet.
Sort a roll of names by last name, or shuffle a list for a random draw.
De-duplicate, drop blanks, and get a file back. No account.
Frequently asked questions
What is a text sorter?
It is a tool that reorders lines or words. This one sorts alphabetically, by length, in natural order, or at random, and can also clean blanks and duplicates.
How do I sort text alphabetically?
Paste one item per line, choose A → Z or Z → A, and the result updates immediately. Turn on Case insensitive if Apple and apple should sit together.
What is natural sort?
Natural sort compares the number parts of a string as numbers. item2 comes before item10, which a plain alphabetical sort gets wrong.
Can I sort by line length?
Yes. Short first puts the shortest lines at the top. Long first does the opposite. Equal lengths then fall back to A–Z.
Can I remove duplicate lines?
Enable Remove duplicates. The first spelling is kept. With Case insensitive on, Apple and apple count as the same line.
Can I sort a paragraph of words?
Switch Split input to Words. The paragraph is split on whitespace, sorted, and joined back with single spaces.
How do I sort names by last name?
Turn on Sort by last word. Ada Lovelace is then compared as Lovelace.
Is my text uploaded?
No. Sorting runs in your browser. A draft can be saved to this browser’s local storage only.
Can I download the sorted list?
Yes. Download a plain .txt file or a one-column .csv. Commas and quotes inside a line are escaped.
Is this text sorter free?
Yes. It is free, needs no account, and has no daily limit.