Sort lines
Sort lines alphabetically, naturally, by length or by leading number.
Related tools
Sort lines
Paste any list and this tool sorts its lines the way you choose. Six orders are available: classic A → Z and Z → A, a natural order that understands numbers inside text, shortest first, longest first, and a numeric order that reads the leading number of each line. Use it to alphabetise names, order keyword lists, arrange file names, rank measurement logs or tidy any list before sharing it.
Natural order is the one to pick when your lines contain numbers: it places file2 before file10, exactly as a person would, where a plain alphabetical sort puts file10 first because it compares character by character. Numeric order goes a step further — it parses the number at the start of each line ("12 apples", "-3.5 kg") and sorts by its value, moving lines without a leading number to the end.
Two switches control how lines are compared. Trim whitespace ignores leading and trailing spaces, so indented lines sort by their content. Case-insensitive treats "Apple" and "apple" as equal, keeping the comparison about words rather than capitalisation. Both are on by default because that is what most lists need; turn them off for a strict byte-by-byte view. Windows (CRLF) and Unix (LF) line endings are handled interchangeably.
Sorting happens entirely in your browser — the text is never uploaded, so private lists such as customer names or internal identifiers stay on your device. The tally under the output shows the line count and the active order, and the result updates live as you type.