Sort Lines
Sort any list alphabetically, by length or by number.
Order
Your text stays in your browser. Nothing is uploaded.
More Text Tools
All tools- Alphabetize listPut words or names in ABC order
- Shuffle linesPut lines in a random order
- Add line numbersNumber every line of text
- Reverse textBackwards letters, words or lines
- Word counterCount words, characters and reading time
- Character counterCharacters with and without spaces
- Case converterUpper, lower, title, sentence case and more
- Remove duplicate linesKeep only unique lines in a list
- Text compareFind the differences between two texts
How to use the sort lines
Three steps, all in your browser.
- 1
Add your text
Type, paste or open a .txt file. Press Sample to try an example.
- 2
Choose the order
Pick an order or format. The result updates live.
- 3
Copy or download
Copy the result in one click or save it as a .txt file.
Sort Lines: what to know
Sort Lines puts the lines of your text in order: A to Z, Z to A, natural order (so 'item 2' comes before 'item 10'), shortest first, longest first, or simply reversed.
Sorting is language-aware: accented letters sort next to their base letter instead of after Z. 'Ignore case' (on by default) keeps 'apple' and 'Apple' together; turn it off for computer-style ordering where capitals come first.
Options remove empty lines, remove duplicates and trim spaces from each line, so you can clean and sort a list in one pass. Lines are compared as whole lines, so sorting 'Smith, John' style entries sorts by surname.
Popular uses
- Ordering lists of names, products or keywords
- Sorting file names and versions in natural number order
- Ranking lines by length for headlines or slogans
- Reversing a log so the newest entries come first
Tips for the best result
- Use natural order whenever lines contain numbers.
- Turn on 'Remove duplicates' to clean and sort a list at once.
- For a quick alphabetical list of names, the Alphabetize List tool has a few extra options.
Read how JustYourText works and our privacy details. Text you type or paste is processed in your browser and is never sent to our server.