How to use Sort Lines
- Paste your list, one item per line.
- Choose a sort order from the menu – the result updates immediately.
- Tick “Remove duplicate lines” or “Remove empty lines” if you also want to clean the list.
- Copy or download the sorted list.
About this tool
Alphabetical sorting uses your browser’s locale-aware collation, so accented letters sort next to their base letter (é with e) instead of after z, which is what plain computer sorting does. Natural sort additionally compares runs of digits as numbers, so “file2” comes before “file10” – the order people expect for file names, chapters and versions.
Numeric sort reads the first number on each line, including negatives and decimals, so lines such as “10 apples” and “9 pears” sort as 9 before 10. Lines without a number are placed at the end in alphabetical order. Lines that compare equal keep their original relative order (the sort is stable).
Random shuffle uses the Fisher–Yates algorithm with the browser’s cryptographically secure random number generator, so every possible order is equally likely. That makes it suitable for picking raffle winners or randomising survey options.
Frequently asked questions
Why does 10 come before 9 in A–Z order?
Alphabetical order compares character by character, and “1” comes before “9”. Choose “Numeric” or “Natural” to sort numbers by value.
Is the random shuffle really random?
Yes. It uses crypto.getRandomValues, a cryptographically secure source, with an unbiased Fisher–Yates shuffle. Press “Shuffle again” for a new order.
Can I sort case-insensitively?
Tick “Ignore upper/lower case” so that “apple” and “Banana” sort together regardless of capitals.
Are my texts uploaded to a server?
No. The whole process runs inside your browser with JavaScript. Your texts never leave your device, which also means the tool keeps working if you go offline after the page has loaded.
Is this tool really free?
Yes. There is no sign-up, no daily limit, no watermark and no paid tier. The site is supported by advertising shown on the page, not by charging for the tools.