Back to Tools

Text Sorter – Sort Lines Alphabetically Online Free

4.8
(216 votes)

Sort lines alphabetically, numerically, by length, natural order, or randomly. Remove duplicates, trim whitespace, add numbering. Free.

Sort ModeActive: A → Z
Input10 items
Output10 items
When to use each sort

Alphabetical (A→Z)

Standard use: lists, names, tags. Uses localeCompare — handles accented characters (é, ü, ñ) correctly, unlike simple < comparison.

Natural sort

Best for filenames, version numbers, mixed lists. "file9" before "file10", "v1.2" before "v1.10". The same algorithm Windows Explorer uses.

Numeric sort

For lists where items start with numbers: "2 apples" before "10 apples". Falls back to alphabetical for non-numeric items.

By length

Useful for SEO keyword lists, tweet drafts, formatting. Shortest-first is good for fitting items into tables or grids.

Processed entirely in your browser — nothing sent to any server