About the Sort Text Lines
The Sort Text Lines tool organizes lists in seconds. Unlike a basic alphabetical sort, it uses natural sorting, so "item 2" correctly comes before "item 10", and it understands accented characters in many languages.
Choose from alphabetical ascending or descending, numeric order (which reads the number inside each line, such as prices or scores), sorting by line length, simply reversing the list or shuffling it randomly. It is useful for organizing names, bibliography entries, keywords, CSS properties, imports in code, to-do lists and survey answers.
Natural sorting and other examples
A normal alphabetical sort puts numbers in a strange order, because it compares character by character:
file 1, file 10, file 2, file 20, file 3
Natural sorting reads the numbers as numbers:
file 1, file 2, file 3, file 10, file 20
Choosing the right mode
- A to Z: names, glossaries, bibliography entries and country lists.
- Numeric: lines that contain a value, such as Laptop 85000 or Ali – 72 marks. Lines are ordered by the number inside them.
- By length: find the shortest and longest titles, or order CSS properties neatly.
- Reverse: flip a list without changing anything else, for example to show the newest entry first.
- Shuffle: random order for quiz questions or presentation slots.
Tip: if a list has duplicates, run it through Remove Duplicate Lines first. A sorted list with duplicates removed is the cleanest starting point for keyword lists, tags and mailing lists.
How to use the Sort Text Lines
- Paste your list with one entry per line.
- Pick a sort order from the dropdown.
- Toggle case sensitivity or empty line removal if needed.
- Copy the sorted list from the right panel.
Frequently asked questions
What is natural sorting?
Natural sorting compares numbers inside text by their value instead of digit by digit, so file2 comes before file10, just as a human would expect.
How does numeric sort handle lines without numbers?
Lines that contain no number are placed at the end of the list.
Is the random shuffle truly random?
It uses the Fisher-Yates shuffle, which gives every possible order an equal chance.
