Use this free text sorter to put lines of text into order. Paste a list and sort it alphabetically, from Z to A, by length, or in random order. You can ignore letter case, sort numbers correctly, remove duplicates, and clean up stray spaces and blank lines. Everything runs in your browser and nothing is uploaded or stored.
A sorted list is easier to scan, compare, and check for gaps. Sorting is fastest when every item sits on its own line.
How to use the text sorter
Paste your lines, choose an order, and the result updates instantly.
- Paste your lines: put one item on each line. Names, URLs, keywords, and product codes all work.
- Sort by: pick A to Z, Z to A, shortest first, longest first, or random shuffle.
- Sort options: turn on any combination of ignore case, numeric sorting, duplicate removal, space trimming, and blank line removal.
- Copy or download: copy the sorted text, or download it as a .txt file.
How the sorting works
- Alphabetical: lines are compared character by character, using the order of the alphabet.
- Ignore case: "apple" and "Apple" are treated as equal when comparing, so they sit together.
- Numeric sorting: numbers inside lines are compared by value, so "item 2" comes before "item 10".
- By length: lines are ordered by their number of characters, after trimming if that option is on.
- Random shuffle: lines are placed in a random order. Run it again to get a different order.
What this tool does and does not do
This tool reorders the lines you paste. It does not change the wording of lines, check spelling, or fetch content from a web page. Sorting is line by line, so a paragraph that spans several lines will be split up. If you need to sort words within a sentence, use the Word Counter or copy the words onto separate lines first.
Sort options at a glance
| Option | Effect | Typical use |
|---|---|---|
| Ignore case | Treats upper and lower case as the same | Mixed-case lists of names or keywords |
| Sort numbers numerically | Compares numbers by value | File names, versions, and numbered items |
| Remove duplicates | Keeps only the first copy of each line | Cleaning up merged lists |
| Trim spaces | Removes spaces at the start and end of lines | Lists copied from documents or spreadsheets |
| Remove blank lines | Drops empty lines from the output | Lists with gaps between items |
Sort first, then check. A quick scan of the output often catches a missing item or a line that was pasted in the wrong place.
Worked examples
Alphabetizing a list of names
Paste the names one per line, turn on Ignore case, and choose A to Z. Names such as "maria" and "Maria" end up next to each other.
Ordering numbered files
For lines such as "file 2", "file 10", and "file 1", turn on Sort numbers numerically. The result runs 1, 2, 10 instead of 1, 10, 2.
Cleaning a keyword list
Turn on Remove duplicates, Trim spaces, and Remove blank lines, then sort A to Z. The output is a tidy list with each keyword once.
Common sorting mistakes
- Forgetting numeric sorting. Without it, "10" sorts before "2". Turn on numeric sorting for numbered lists.
- Leaving trailing spaces. Invisible spaces can push a line out of place. Turn on Trim spaces.
- Pasting wrapped paragraphs. Each visual line in a paragraph is sorted separately. Put one item on each line first.
- Expecting random shuffle to be repeatable. Each shuffle gives a new order, so copy the result you want to keep.
Frequently asked questions
Is this text sorter free?
Yes. There is no sign-up and no limit on how many lists you sort.
Is my text sent or stored?
No. Sorting happens in your browser and nothing is uploaded or saved. The text is cleared when you leave or refresh the page, so copy the result before you go.
How do I sort numbers correctly?
Turn on Sort numbers numerically. Then 2 comes before 10, instead of 10 appearing before 2 as it does in plain alphabetical order.
Does sorting change my text?
Sorting only changes the order of lines. The wording stays the same. Trimming spaces and removing blank lines or duplicates are the only other changes, and each one is optional.
Is there a limit on how many lines I can sort?
The tool accepts up to 200,000 characters of text. Very large lists may take a moment to process on slower devices.