Free Text Line Sorter
Something not working? Report a problem
About the Sort Text Lines
Sort lines of text alphabetically, numerically or by length — reverse the order and remove duplicates in one step, all live in your browser with no upload.
How to use the Sort Text Lines
- 1Paste your lines into the box on the left — one item per line.
- 2Pick how to sort: alphabetically, naturally, by number, or by line length.
- 3Optionally reverse the order, match case, or remove duplicates while sorting.
- 4Copy the sorted result with one click — nothing is ever uploaded.
Frequently asked questions
Is this tool free?
Yes — completely free, with no sign-up and no watermark.
Is my text uploaded anywhere?
No. All sorting happens in your browser — your text never leaves your device.
How do I sort file1, file2, file10 in the right order?
Choose “Natural (text + numbers)”. It reads any digits inside a line as a number, so file2 comes before file10 and “Chapter 2” before “Chapter 10”. Plain alphabetical sorting compares digit by digit, which is why it puts file10 before file2.
How does numeric sorting work?
Each line is sorted by the number it starts with, so 2 comes before 10 (unlike alphabetical order, where “10” comes before “2”). Lines that don't start with a number are placed at the end, and they stay at the end when you reverse the order. If your numbers sit inside the text rather than at the start, use natural sorting instead.
What does “sort by length” do?
It orders lines from shortest to longest by character count. Turn on “reverse” to put the longest lines first. Lines of equal length fall back to alphabetical order, which stays A–Z even when the order is reversed.
What does “match case” change?
With it off, Apple and apple are treated as the same word and keep the order you typed them in. With it on, capitals sort before lowercase, so Apple comes before apple.
Can it remove duplicates too?
Yes — turn on “remove duplicates” to drop repeated lines as part of sorting, so you get a clean, sorted, unique list in one step.