Text Tools
Sort Lines Alphabetically
Sort lines A–Z or Z–A with numeric, case and empty-line options.
Sort direction
Options
What is the Sort Lines tool?
This free online tool alphabetizes any line-based list in one click. Paste in names, products, keywords, or any text with one item per line, choose ascending (A to Z) or descending (Z to A), and get a neatly ordered result. Options for numeric sorting, case-insensitive comparison, and empty-line removal handle the tricky cases that plain sorting gets wrong.
How to use it
- Paste your list into the box, one item per line.
- Choose Ascending (A to Z) or Descending (Z to A).
- Tick “Numeric sort” if lines contain numbers like “Item 2” and “Item 10”.
- Click “Sort lines”, review the result, and copy it with one click.
Key features
- Ascending and descending alphabetical sorting.
- Numeric sort so “Item 2” correctly comes before “Item 10”.
- Case-insensitive mode (on by default) so “apple” and “Banana” sort naturally.
- Optional empty-line removal for messy pastes.
- One-click copy; everything runs privately in your browser.
Real-world use cases
Office workers alphabetize attendee and inventory lists. SEOs sort keyword lists before analysis. Developers order config entries and changelog items. Students arrange bibliographies and vocabulary lists.
Practical tips
- Enable numeric sort for numbered items — plain alphabetical sorting puts “Item 10” before “Item 2”.
- Remove empty lines first if your paste came from a spreadsheet with gaps.
- Pair it with Remove Duplicate Lines to get a clean, unique, alphabetized list.
Frequently Asked Questions
Why does “Item 10” come before “Item 2” without numeric sort?
Plain alphabetical sorting compares character by character, so “1” comes before “2”. Numeric sort compares the numbers themselves, giving the order you expect.
Does sorting change the case of my text?
No. Case-insensitive mode only affects the comparison order — your original capitalization is preserved exactly.
What happens to duplicate lines?
Duplicates are kept as-is; this tool only reorders. Use the Remove Duplicate Lines tool first if you want a unique sorted list.
Can I sort in reverse (Z to A)?
Yes. Select the “Descending (Z to A)” option before clicking Sort lines.
Is my list uploaded to a server?
No. Sorting happens locally in your browser and nothing is sent anywhere.