Sort Lines Alphabetically
Sort lines A–Z or Z–A with numeric, case and empty-line 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 the Line Sorter Online
- 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.
Line Sorter — 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.
Line Sorter — 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.
Worked example: the same list, sorted three ways
Start with this messy list, one item per line: Banana, apple, Item 10, Item 2, Mango. Sorting it is not one single operation — the mode you choose changes the result, and choosing the wrong mode is the most common mistake with this kind of tool.
- Alphabetical, case-insensitive, ascending: apple, Banana, Item 10, Item 2, Mango. The words are in A to Z order, and case does not push "Banana" ahead of "apple". But "Item 10" still comes before "Item 2", because alphabetical comparison reads "1" before "2".
- Numeric sort, ascending: apple, Banana, Item 2, Item 10, Mango. Now the numbers inside the lines are compared as numbers, so 2 correctly comes before 10, and the plain words keep their alphabetical order around them.
- Alphabetical, descending: Mango, Item 2, Item 10, Banana, apple. The whole order is reversed, Z to A.
If your list mixes words and numbers, run it with numeric sort on. If it is only names, plain alphabetical sort is enough. And if the result still looks wrong, check whether empty lines or leading spaces are hiding in the paste — both change where a line lands.
Which sort mode should you choose?
- Ascending (A to Z): the default for attendee lists, bibliographies, product names and keyword lists.
- Descending (Z to A): useful when you want the newest or highest items first, or when you are checking a list from the end backwards.
- Numeric sort: essential for anything numbered — Item 2 and Item 10, Chapter 9 and Chapter 11, Version 1.2 and Version 1.10. Without it, "10" always beats "2".
- Case-insensitive: leave this on unless you deliberately want all capitalised words grouped before all lowercase ones. With it off, sorting follows character codes, which is rarely what a human list means.
- Remove empty lines: turn this on for pastes from spreadsheets or documents, where blank rows sneak in between items.
Who uses a line sorter?
- Office and admin staff. Attendee lists, inventory lists, supplier names and mailing lists all need to be in order before they are printed or shared.
- SEOs and content writers. Keyword lists, topic lists and tag lists are sorted before analysis, so duplicates and near-duplicates are easier to spot.
- Developers and data workers. Config entries, changelog items, test cases and log lines are easier to review and compare once they are in a predictable order.
- Students and researchers. Bibliographies, vocabulary lists, survey responses and reference lists are sorted for checking and for submission.
No sign-up, no limits, no uploads — it runs 100% in your browser.
Honest limitations
- This tool only reorders — it does not deduplicate. If a line appears twice, it will appear twice in the sorted result. Use the Remove Duplicate Lines tool first if you want a unique list.
- It does not sort by date or by meaning. Dates written as "12 March" and "3 April" sort alphabetically by their text, not chronologically. For dates, rewrite them in year-month-day form first.
- Sorting breaks grouping. If your list is grouped on purpose — steps in a process, sections under headings, or a ranked list — sorting will scatter those groups. Only sort lists where order itself is the point.
- Numbers written as words are not numeric. "Ten" and "two" are words to this tool, not numbers. Numeric sort only recognises digits, so spell out numbers consistently or convert them to digits first.
A reliable workflow for a clean list
- Remove duplicate lines first, if you need a unique list.
- Clean up whitespace and empty lines.
- Sort with numeric mode on if any line contains a number.
- Read the top and bottom of the result — that is where a wrong mode shows up first.