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 the Line Sorter Online

  1. Paste your list into the box, one item per line.
  2. Choose Ascending (A to Z) or Descending (Z to A).
  3. Tick “Numeric sort” if lines contain numbers like “Item 2” and “Item 10”.
  4. Click “Sort lines”, review the result, and copy it with one click.

Line Sorter — Key Features

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

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.

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?

Who uses a line sorter?

No sign-up, no limits, no uploads — it runs 100% in your browser.

Honest limitations

A reliable workflow for a clean list

  1. Remove duplicate lines first, if you need a unique list.
  2. Clean up whitespace and empty lines.
  3. Sort with numeric mode on if any line contains a number.
  4. Read the top and bottom of the result — that is where a wrong mode shows up first.

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.
Does numeric sort work on numbers written as words?
No. Numeric sort recognises digits, such as 2 and 10. The words "two" and "ten" are sorted alphabetically like any other word, so convert number-words to digits first if you need numeric order.
Will blank lines stay in my sorted list?
Only if you leave "Remove empty lines" unchecked. With it checked, blank lines are dropped before sorting, which is usually what you want for a paste from a spreadsheet.
Does sorting change my spelling or punctuation?
No. Sorting only changes the order of whole lines. The text inside each line — spelling, punctuation and capitalisation — is preserved exactly.
Can I sort a comma-separated list?
Not directly. This tool works on one item per line, so first put each item on its own line, then sort. A comma list pasted as a single line will be treated as one line.
How do I sort a list alphabetically online?
Paste your lines and click sort — A-Z, Z-A, numeric and length options, all in one click.
Can I sort numbers correctly?
Yes — choose numeric sort so 10 comes after 2, not after 1.