Text Sorter

Free

Sort lines of text alphabetically, numerically, or by length, instantly.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

7 lines
Output
This tool runs entirely in your browser — nothing you enter is uploaded or stored.

How it works

What sort modes are available?

Alphabetical (A–Z or Z–A, with an optional case-sensitivity toggle), natural/numeric sort (handles embedded numbers the way a person would expect — see the next question), by length (shortest to longest or the reverse), and a random shuffle for when you want a randomized order, like drawing names for a raffle.

What's the difference between alphabetical and "natural" sort?

Plain alphabetical sorting compares text character by character, which trips up on embedded numbers: sorting ["item2", "item10", "item1"] alphabetically produces ["item1", "item10", "item2"] — "item10" lands before "item2" because "1" comes before "2" as a character, regardless of the full number's value. Natural sort fixes this by comparing the numeric parts of each line as actual numbers, producing the order most people actually expect: ["item1", "item2", "item10"].

Why does alphabetical sort handle capital letters differently from a basic sort?

A naive character-code sort puts every uppercase letter before every lowercase one (since 'A'–'Z' sit below 'a'–'z' in character encoding), so a list like ["banana", "Apple", "apple", "Banana"] would sort as ["Apple", "Banana", "apple", "banana"] — all-capitalized words first, regardless of their actual letter. This tool uses locale-aware collation instead, which compares by the base letter first, so "apple" and "Apple" land next to each other the way a person alphabetizing a list actually would.

Is anything I paste here sent anywhere?

No — every sort happens locally in your browser.

Related tools