Sort Lines
Paste a list of lines to instantly sort them alphabetically or by length — entirely in your browser.
Result will appear here
Frequently Asked Questions
How does alphabetical sorting handle numbers and symbols?
It uses standard locale-aware string comparison, so numbers and symbols sort by their character code position relative to letters.
Can I sort by line length instead of alphabetically?
Yes — choose "Shortest first" or "Longest first" to sort by character count instead.
Does sorting remove duplicate lines?
No — sorting only reorders lines. Use the separate Remove Duplicate Lines tool if you also need to dedupe.
Related free utility tools
- Reverse TextReverse text by character, word order, or line order instantly.
- Text Diff CheckerCompare two blocks of text line by line with additions and removals highlighted.
- Slug GeneratorTurn any title into a clean URL-friendly slug with hyphens or underscores.
- HTML Escape / UnescapeEscape raw HTML into safe entities, or decode escaped entities back to markup.
- Cron ParserPaste a 5-field cron expression to get an instant plain-English schedule description.
- Social Media Username CheckerCheck if a username is available across 35+ platforms — GitHub, Instagram, TikTok, X, and more — at once.
Explore CodeSpeedTest