Sort Lines
Alphabetically sort lines ascending or descending, numbers-aware.
Browser onlyYour data never leaves this device.
Runs entirely in your browser. Your text never leaves this device and is never stored.
Details: Privacy policy
Input
One item per line. Nothing is stored.
Result
No lines yet.
Paste a list above to sort it.
Sort Lines arranges pasted lines alphabetically in either direction, understands numbers embedded in the text, and can ignore letter case on request. It is handy before publishing a name or inventory list, when comparing two exports, or while tidying a changelog whose entries follow version labels. Numeric mode places item2 before item10, case-insensitive mode compares base letters only, and identical lines keep their original relative order instead of shuffling unpredictably. Ordering follows English collation rules and normalises line endings to LF in the output. Everything is reordered in the browser, so drafts, customer names and internal lists are never uploaded, and the sorted result is ready to copy straight back into your document. Blank lines are kept and sort to the front, so strip them first when you want a dense list. Long documents remain responsive because ordering happens in memory rather than through repeated redraws of the interface. Choose descending order for scores that read best from high to low. With numeric awareness enabled, embedded values compare by magnitude; switch it off for plain character order. Ordering follows English locale rules with optional numeric awareness, and lines that compare equal keep their original relative order. Collation follows English locale ordering rather than raw code-point comparison, and numeric awareness keeps chapter 2 ahead of chapter 10 instead of behind it.
How to use Sort Lines
- Paste lines and choose direction and options.
- Read the sorted output instantly.
- Copy the result or clear to start over.
What you get
- The full line list reordered ascending or descending by your chosen options.
- Numeric-aware and case-insensitive comparisons on request.
- Output with line endings normalised to LF, ready to copy.
When to use Sort Lines
- Alphabetize name or inventory lists before publishing them.
- Order version-tagged lines numerically instead of lexicographically.
- Tidy a pasted changelog so entries read in sequence.
Frequently asked questions about Sort Lines
Does Sort Lines upload my list?
No. Sorting runs locally in your browser; nothing is sent, stored, or logged.
How are numbers sorted?
With numeric mode on, “item2” sorts before “item10”. Without it, plain character order applies.
What happens to identical lines?
They stay in their original relative order. Pair with Remove Duplicate Lines to drop them.
Which locale rules apply?
English collation rules. Case-insensitive mode compares base letters only.
Tools related to Sort Lines
- Remove Duplicate Lines
Delete repeated lines while keeping the first occurrence in order.
- Find Shortest Line — find the shortest non-empty line
Find the shortest non-empty line, its line number, length and tie count.
- Find Longest Line
Find the longest non-empty line, its line number, length and tie count.
- Add Line Numbers — prefix every line with a counter: custom start
Prefix every line with a counter: custom start, step, and separator.
- Case Converter
Switch text between uppercase, lowercase, title, and sentence case.
- Remove Lines Containing — keep or remove whole lines that contain a specific word
Keep or remove whole lines that contain a specific word, phrase, or string.
⚡Embed Sort Lines on Your Site & Get Badge↓
Embed this in-browser tool into any blog, documentation, or dashboard. Includes an optional dofollow backlink badge to credit Tools Hub.
<iframe src="https://salaq.com/embed/text/sort-lines" title="Sort Lines — Tools Hub" width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden;max-width:100%;" loading="lazy"></iframe>
<p style="font-size:12px;color:#6b7280;margin-top:6px;font-family:system-ui,-apple-system,sans-serif;">Powered by <a href="https://salaq.com/tools/text/sort-lines" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:underline;">Sort Lines on Tools Hub</a></p>Feedback
Send feedback about this tool (placeholder — feedback collection is not wired up yet).