Sort Lines
Sort lines A to Z, Z to A, by length, in natural (numbers-aware) order, or shuffle them -- with locale-aware, case-insensitive comparison -- instantly, in your browser.
Sort lines puts a list in alphabetical order (A–Z or Z–A), sorts by length, uses natural ordering so file2 comes before file10, or shuffles randomly. Sorting runs instantly in your browser with correct handling of accents and numbers.
How this works
Alphabetical sorting uses locale-aware comparison, so accented letters like é sort next to their unaccented equivalent rather than at the end of the alphabet. Plain A–Z sorting compares text character by character, which is why "file10" normally sorts before "file2" — the character "1" comes before "2". Natural sort instead compares the numeric parts of each line as numbers, so file2 correctly comes before file10.
Shuffle uses a Fisher–Yates shuffle, which produces a uniformly random ordering — every possible order is equally likely.
FAQs
Why does "file10" sort before "file2" normally?
Standard alphabetical (lexical) sorting compares text character by character, not as numbers — and the character "1" comes before "2". Use natural sort mode if you want file2 to come before file10.
Does case affect sorting?
By default, sorting is case-insensitive, so "banana" and "Banana" sort next to each other based on their letters, not their capitalization.
How are accented letters handled?
Locale-aware comparison places accented letters (like é or ü) next to their unaccented equivalent, matching how a human would alphabetize them, not their raw character code.
Can I ignore "The" when alphabetizing a bibliography?
Yes — turn on the "ignore leading a/an/the" option and those leading articles are skipped when determining sort order, though they still appear in the output.
Is my text uploaded anywhere?
No. This tool runs entirely in your browser — your text is never sent to a server, uploaded, or stored anywhere.