Line Sorter
Sort a list of lines alphabetically, numerically, by length or randomly, with optional reversing and duplicate removal.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Line Sorter does
This line sorter will sort a list of lines alphabetically, numerically, by length or randomly, with optional reversing and duplicate removal. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for alphabetising a reference list or glossary. Next to this one sits our text repeater.
How to use it
- Paste your list with one item per line.
- Choose the sort order.
- Tick "remove duplicates" if you also want the list deduplicated.
- Copy the sorted list.
How it works
Alphabetical sorting uses locale-aware comparison, so accented letters sort next to their base letters the way a dictionary in your language would order them, rather than being pushed to the end as they would be with a raw byte comparison.
Numeric sorting parses the start of each line as a number. It is the right choice for a list of figures, where alphabetical order would place 10 before 2 because it compares character by character.
Blank lines are removed during sorting, since a sorted list of blanks has no meaning. Shuffle uses a Fisher-Yates shuffle for an unbiased random order.
When to use it
- Alphabetising a reference list or glossary.
- Ordering a list of numbers pasted from a spreadsheet column.
- Randomising a list to pick a running order.
Common mistakes to avoid
- Sorting mixed text and numbers alphabetically, which puts 10 before 2.
- Sorting a list where the order carried meaning — ranked results, chronological entries — without keeping a copy of the original.
Frequently asked questions
How are numbers sorted?
Choose one of the number modes and each line is parsed as a numeric value from its start. In alphabetical mode, numbers are compared as text, which is why "10" sorts before "2".
Does sorting remove blank lines?
Yes. Blank lines are dropped during the sort because they carry no sort position. Use a different tool if you need to preserve them.