Sort lines of text alphabetically, numerically, by length, or at random — instantly in your browser. Trim whitespace, remove empty lines, then copy or download the result. No sign-up, nothing stored.
Sorting lines reorders a list of text — one item per line — into a chosen order. The most common is alphabetical (A→Z or Z→A), but you can also sort by the leading number on each line, by line length, or flip and shuffle the order entirely.
This tool runs the sort live as you type and keeps the original input alongside the result, so you can compare and tweak options without losing your data. Everything happens locally in your browser.
Order lines A→Z or Z→A, with an optional case-insensitive mode for natural, dictionary-style results.
Sort by the leading number on each line using parseFloat; non-numeric lines fall to the bottom.
Arrange lines from shortest to longest — handy for spotting outliers or tidying lists.
Flip the current order instantly, or randomize every line for sampling and quick picks.
Trim whitespace on each line and drop empty lines so the result is ready to use.
Your text never leaves the browser. Nothing is uploaded, logged, or stored.
Drop a list into the input box — one item per line. The output updates live as you type.
Choose alphabetical, numeric, by length, reverse, or shuffle from the order dropdown.
Toggle case-insensitive matching, trim whitespace, and remove empty lines to fit your data.
Grab the sorted result with one click, or download it as a .txt file. Clear resets the input.
Each line is parsed with parseFloat, which reads the leading number. Lines that do not start with a number are treated as non-numeric and always sort after the numeric lines, in alphabetical order among themselves.
When enabled, alphabetical sorting ignores letter case, so "Apple" and "apple" are ordered together as if they were the same. Turn it off to sort with case sensitivity, which can separate upper- and lower-case entries.
Z→A sorts the lines alphabetically in descending order. Reverse simply flips the current order of the lines as they appear in the input, without sorting them — useful for inverting an already-arranged list.
Shuffle uses a Fisher-Yates algorithm driven by the browser's Math.random, which is fine for everyday randomization like drawing names or sampling. It is not cryptographically secure, so do not use it for security-sensitive draws.
Sorting alone keeps the same number of lines. The counts change when you enable "Remove empty lines", which drops blank lines from the result, so the output can have fewer lines than the input.
No. All sorting happens entirely in your browser with JavaScript. Your text is never sent to a server, stored, or logged — close the tab and it is gone.
Convert text to UPPERCASE, lowercase, Title, camelCase, snake_case, and more.
Bulk find and replace text with case-insensitive, whole-word, and regex options.
Remove duplicate lines from text — keep first occurrence, ignore case, trim, sort.
Delete line breaks and blank lines; join lines with a space or custom string.