Sort lines in 7 modes: alphabetical, reverse, numeric, random, by length, case-insensitive, and natural order. Remove duplicates and blank lines too.
Sort order
Paste lines and click Sort Lines
Line sorting organizes newline-separated data without changing each lineβs contents. Alphabetical modes use locale-aware comparison, numeric modes compare leading numeric values, and length modes compare character counts.
| Mode | Typical use |
|---|---|
| A to Z / Z to A | Word lists and names |
| Numeric ascending / descending | IDs and measurements |
| Shortest / longest | Prioritizing text |
| Random shuffle | Sampling and test data |
Optional duplicate removal preserves the first occurrence, while blank-line removal filters whitespace-only lines. Case-sensitive comparison distinguishes uppercase and lowercase; insensitive comparison groups them.
banana
apple
cherry
The result is generated in the browser, making the tool suitable for configuration snippets, import lists, tags, and text cleanup.
This tool is provided for general informational and utility purposes only. Results may be inaccurate, incomplete, outdated, or contain errors. Always verify results before relying on or using them.
Some tools may use AI, automated processing, third-party services, or server-side processing. Do not rely on these tools as a substitute for professional advice.
Use at your own risk. BestToolOnline makes no guarantees regarding the accuracy, reliability, completeness, availability, or suitability of results, to the maximum extent permitted by applicable law.
See our Terms of Service and Privacy Policy for complete details.