Sort Lines
Order and sort lines alphabetically online with numeric-aware, case-insensitive comparison. Free browser tool, no upload, no account needed.
Runs locally in your browser. Your input is not uploaded to DevToolMate servers.
Developer Quick Tips
- Paste lines and press Ctrl/Cmd + Enter to sort alphabetically with numeric-aware ordering: item2 sorts before item10.
- Numeric-aware sorting handles version numbers, filenames, and log entries correctly without lexicographic confusion.
- Case-insensitive by default; 'Apple' and 'apple' sort together while preserving locale-aware character order.
- Line breaks (LF and CRLF) are preserved; trailing newlines stay intact after sorting.
- Combine with remove-duplicate-lines first to deduplicate while keeping first-seen order, then sort the result.
Frequently asked questions
How do I sort lines alphabetically online?
Paste your lines into Sort Lines and press Ctrl/Cmd + Enter. The tool sorts them alphabetically using locale-aware, case-insensitive comparison. Numeric values are sorted numerically (item2 before item10), not lexicographically.
What is numeric-aware sorting and why does it matter?
Numeric-aware sorting compares digit sequences as numbers, not characters. This means item2 sorts before item10, and version 2.0 sorts before version 10.0. Lexicographic sorting would incorrectly place item10 before item2 because '1' comes before '2' as a character.
What line breaks does Sort Lines support?
Sort Lines handles both LF and CRLF line breaks. Trailing newlines on input are preserved on output, so your formatting stays intact.
Does Sort Lines upload my data to servers?
No. Sort Lines runs entirely in your browser. Your input never leaves your device and is never uploaded to DevToolMate or any external service.
Do I need an account to use Sort Lines?
No account required. Sort Lines is free and runs locally in your browser. Input stays in memory for the current session only.
How do I remove duplicate lines before sorting?
Use the remove-duplicate-lines tool first to deduplicate while keeping first-seen order, then paste the output into Sort Lines for alphabetical ordering.
Can I sort lines in vim, VS Code, or Sublime instead?
Yes, most editors have built-in sort commands. VS Code uses Ctrl/Cmd + Shift + P then 'Sort Lines', vim uses :sort, and Sublime uses Edit > Sort Lines. Sort Lines online is useful when you need numeric-aware sorting or want a quick browser tool without editor setup.
Related tools
- Remove Duplicate Lines: Remove duplicate lines online free. Deduplicate text while keeping first occurrence in order. Browser-based, no upload, no account needed.