How to use the sort lines
- Paste or type your list with one item per line. The sorted version appears immediately on the right.
- Pick an order: A→Z, Z→A, numeric (by the number at the start of each line), shortest or longest first, reverse, or shuffle.
- Optionally ignore case, trim surrounding spaces, remove empty lines and remove duplicate lines.
- Copy the result, download it as a text file, or click “Use as input” to chain another operation.
Features
- Natural alphabetical sorting so item 2 comes before item 10
- Numeric sort that understands signs, decimals and thousands separators
- Sort by length, reverse the current order, or shuffle with cryptographic randomness
- Case-insensitive matching, trimming, blank-line and duplicate removal
- Line counts in, out and removed, plus copy and download
How each order works
A→Z and Z→A use locale-aware comparison with numeric collation, so “file2” sorts before “file10” and accented letters land next to their plain equivalents. Numeric order looks at the number at the start of each line (for example “12 mangoes” or “-3.5”), sorts by its value, and places lines without a leading number at the end. Length order counts characters as people see them, so an emoji counts as one.
Shuffle uses the browser's cryptographic random generator with a Fisher–Yates shuffle, which gives every arrangement the same chance. Press “Shuffle again” for a fresh order.
Common uses
Alphabetising a bibliography or a list of names, ordering CSS properties or import statements, ranking scores stored one per line, randomising a list of participants for a draw, or cleaning a keyword list before pasting it into a spreadsheet.