ToolNest logoToolNest.

Sort Lines Alphabetically Online

Last updated: October 12, 2026

Quick answer: Alphabetize any list in one click. Our free line sorter sorts lines A–Z or Z–A, with optional case-insensitive matching and numeric-aware ordering — ideal for keyword lists, bibliographies, inventories, and cleaning data before import.

🔒 100% Private: Data never leaves your device.

✓ Free forever  ·  ✓ No signup  ·  ✓ Tool inputs stay in your browser — never sent to our servers.

Try next: Remove Duplicate Lines · Reverse Text Generator · Case Converter

How to Use the Sort Lines

  1. Paste your list — one item per line.
  2. Keep 'Case-insensitive' ticked so 'apple' and 'Banana' sort naturally.
  3. Click Sort A–Z or Sort Z–A.
  4. Copy your alphabetized list with one click.

Why Use Our Sort Lines?

Common Use Cases

Sort Lines vs Alternatives

Bottom line: use your editor or spreadsheet when the list already lives there. For a fast paste → sort → copy on any device with no install, this page is the shorter path.

Frequently Asked Questions

Can I sort a numbered list?
Yes — numeric-aware sorting puts item2 before item10, which plain alphabetical sorting gets wrong.
Does it remove duplicates too?
This tool only sorts. For deduplication, use our Remove Duplicate Lines tool — the two work great together.
Will blank lines break the sort?
Blank lines sort to the top; delete them first or leave them — they won't corrupt your data.
How many lines can it sort?
Thousands of lines sort instantly in your browser.
Is it free?
Yes — free forever, no signup.
How do I sort lines alphabetically in Excel or Google Sheets?
In Google Sheets use =SORT(A:A); in Excel, select the range and click Data → Sort A to Z. For a quick one-off list that isn't in a spreadsheet yet, pasting here is faster than opening one.
How do I sort lines in VS Code?
Select the lines, open the command palette (Ctrl/Cmd+Shift+P), and run 'Sort Lines Ascending'. Built in, no extension needed — ideal when the list already lives in your editor.
Why does 'item10' sort before 'item2'?
Plain alphabetical sorting compares character by character: '1' comes before '2', so 'item10' wins. Numeric-aware sorting (what this tool does) compares the embedded numbers as numbers, giving item2, item3, …, item10.
Can I sort by the second word or a specific column?
This tool sorts whole lines only. To sort by a column, paste into a spreadsheet and sort by that column, or use a terminal sort -k command.
How do I shuffle lines instead of sorting?
Shuffling is the opposite job — randomize order rather than alphabetize. Our Random Name Picker draws random entries; for a full shuffle, a quick spreadsheet =RAND() column sorted ascending does it.
Does sorting handle accented characters correctly?
This tool uses basic Unicode ordering, where accented letters like é sort after plain z. For locale-correct ordering (e.g. Swedish å/ä/ö), sort in a spreadsheet with the right locale set.