Type a tool name, for example "keyword density" or "transcript".
Sort text lines alphabetically, numerically, by length, or randomly.
The text line sorter puts any list in order with one click. Paste your lines, choose A to Z, Z to A, shortest or longest first, natural order or numeric order, and copy the sorted output. It suits writers, developers, marketers and anyone cleaning up keyword lists, names, URLs or file names.
Line sorting means rearranging a list so that each line, meaning any piece of text that ends at a line break, appears in a set order. The tool compares whole lines, not single words, and returns them in the order you choose. It offers four kinds of order:
The difference between plain alphabetical and natural order trips up many people. A plain A to Z sort compares digits one at a time, so Item 10 lands before Item 2 because the character 1 comes before 2. Natural order fixes that.
You can sort a list in under a minute by following these steps in order.
Say you paste these five lines, plus one blank line, into the Input box: file10.txt, file2.txt, File1.txt, file2.txt and file1.txt. You leave Case Sensitive unchecked and tick Remove Duplicates.
The tool trims each line and ignores the blank one. It then removes repeats without regard to capitalization, keeping the first copy it meets. The second file2.txt and the lowercase file1.txt are dropped, which leaves three lines and a counter that reads 3 lines.
The lesson is that the same list gives different results depending on the mode, so pick the mode that matches how you read the list.
Pick the mode that matches what your lines contain: words, numbered labels, or values. This table gives a quick guide.
| Button | Best for | Example order |
|---|---|---|
| A → Z or Z → A | Names, keywords, URLs | apple, banana, cherry |
| Shortest or Longest First | Titles, slugs, codes | ox, cat, horse |
| Natural A→Z or Z→A | File names, versions, numbered items | Item 2, Item 10 |
| Numeric ↑ or ↓ | Lines that start with a number | 3, 12, 100 |
Your sorted output is correct when every line appears in the order the chosen mode defines. Check the line counter first: if it shows fewer lines than you pasted, blank lines or duplicates were removed on purpose.
Anyone who handles lists in plain text benefits from sorting them quickly. A few concrete situations:
Good results start with a clean input: one item per line, with nothing else on it. Follow these habits to avoid surprises.
Once your list is in order, you may want to tidy it further. A text case changer can standardize capitalization before you sort. A find and replace tool can strip prefixes or fix repeated typos. To confirm what changed between your original and sorted versions, use a text compare tool. If you need the lines joined into a single row, a comma separating tool does that in one step.
The sorter works on whole lines only. It cannot sort by the second word, a column, or a value in the middle of a line. If your sort key is not at the start, move it there first.
Numeric mode depends on a leading number, and length mode counts characters, not words. The Sorted Output box is read-only, so edit the Input box and sort again to make changes. Alphabetical order follows the browser's language rules, so punctuation, accented letters and symbols may land in places you do not expect. Check the first and last few lines of any important list before you use it.
The text line sorter turns a messy pile of lines into an ordered, duplicate-free list in seconds. Paste your list into the Input box above, pick a sort mode, and copy the result. For more helpers like this, browse the text utility tools collection.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market