What is the Sort Lines?
Paste any list and sort it in one click: names, keywords, imports, CSS properties, file names or log lines. Alphabetical sorting uses your browser's locale-aware collation, so accented letters such as é and ö sort where a reader expects them, not after z.
Natural sort compares the numbers inside text by their value, giving file2, file10, file100 instead of the plain alphabetical file10, file100, file2. You can also sort by line length, reverse the current order, or shuffle randomly with a secure random generator, which is handy for raffles and sampling.
How to use the Sort Lines
- Paste your list, one item per line.
- Pick an order: A→Z, Z→A, natural, by length, reverse or random.
- Optionally ignore case, remove duplicates or drop empty lines. The result updates immediately.
Frequently asked questions
What is natural sort order?
Natural sort treats runs of digits as numbers, so "Chapter 2" comes before "Chapter 10". Plain alphabetical sort compares character by character, so "Chapter 10" would come first because "1" is less than "2".
Is the random shuffle truly random?
It uses the Fisher–Yates shuffle with the browser's cryptographically secure random generator, so every order is equally likely.
Does "ignore case" change my text?
No. It only affects how lines are compared. Each line keeps its original capitalisation in the output.