Sort Lines Alphabetically

Sort a list of lines A to Z, Z to A, by length or by number, and optionally remove blank lines.

Result

In short

What is the Sort Lines Alphabetically?

The Sort Lines tool puts a list in order. Choose A to Z, Z to A, shortest first or by the number in each line, and optionally drop blank lines. Alphabetical sorting ignores capital letters. It is useful for name lists, keyword lists, product names, tags and any data you want to scan quickly.

How to use it

  1. Paste your list, one item per line.
  2. Pick the sort order from the list.
  3. Keep the blank-line option on to remove empty lines.
  4. Copy the sorted list.
Questions

Sort Lines Alphabetically — FAQ

Is the alphabetical sort case sensitive?

No. Apple, apple and APPLE sit together. If they match exactly apart from capitals, the capitalised version comes first.

How does numeric sorting work?

The tool reads the first number in each line and sorts by its value, so 2 comes before 10. Lines without a number go to the end.

Can I sort by line length?

Yes. Choose the length option to list the shortest lines first. Lines of the same length are put in alphabetical order.

More Text & Writing tools