Sort Lines
Sort lines alphabetically, numerically, reverse or randomly.
Frequently Asked Questions
What does `Natural sort` do differently from plain A→Z?
Natural sort uses `localeCompare()` with numeric comparison enabled, so values like `file2` sort before `file10`. Plain A→Z is a regular lexical compare on the normalized text.
Is the shuffle mode truly random?
It shuffles in place with the Fisher-Yates pattern and uses `crypto.getRandomValues()` for the random index, not `Math.random()`. That is a stronger source of randomness for this kind of UI tool.
Can I sort by line length instead of alphabetically?
Yes. Use `Short→Long` or `Long→Short`. Ties fall back to alphabetical comparison on the normalized line content.
Why are empty lines or duplicates still in my output?
Sorting does not remove them by default. `Remove empty lines` and `Remove duplicates` are separate options you need to enable explicitly.
Do I need the Sort button every time?
Not usually. Typing in the input, toggling an option, or changing the sort mode recalculates immediately; the Sort button mainly gives you an explicit action and status message.