Sort text lines in the order you need
Paste one item per line, choose alphabetic, numeric, length or reverse order, then review the sorted list before copying or downloading TXT.
Paste a list and choose an order
Sort a line-by-line list in three steps
Paste a list
Type or paste one item per line. The tool sorts whole lines; it does not read table columns or open files.
Choose an order
Choose the Order you need, set Trim each line and Remove empty lines, then select Sort lines.
Review and export
Check the first and last lines and repeated values, then Copy result or Download TXT. After changing the input or options, sort again before exporting.
Choose the order that fits your list
| Your list | Choose Order | Check the result |
|---|---|---|
| Names or codes with letters | A → Z or Z → A | Review similar names; there is no separate option to distinguish case or accents. |
| One number per line | Numeric ascending | Negative and decimal numbers with a dot or comma sort by value; nonnumeric lines come after numbers. |
| Shortest or longest lines first | Length ascending or descending | Length uses the whole line after Trim each line is applied; it is not a word count. |
| Only reverse the original order | Reverse lines | The last line comes first; line text stays unchanged if trimming is off. |
If the order is unexpected
- Numbers mixed with text
- Numeric ascending reads whole integers or decimals; a dot or comma is treated as a decimal mark, not a thousands separator. Lines with units or letters follow the numbers. For codes such as A2/A10, try A → Z and review.
- Missing lines or spaces
- Remove empty lines also drops whitespace-only lines. Trim each line removes spaces at both ends; turn off the relevant option if you need to keep them, then sort again.
- Repeated lines remain
- Sorting only changes line positions. To remove repeated lines, use Remove Duplicate Lines under Related Tools.
Drafts on this device when available
The list is sorted in your browser. When local storage is available, your text and options are kept for next time. Select Clear to remove this tool’s input, result and draft; downloaded TXT files stay where you saved them.
Comments & feedback
Loading ratings…
Write a commentNo account needed