Free text tool

Sort Lines Alphabetically

Paste a list with one item per line, choose a sort order and the tool returns the sorted list ready to copy.

What is sort lines alphabetically?

Sorting lists helps you spot duplicates, find items quickly and prepare data for import. It is useful for names, keywords, links and product lists.

The alphabetical sort ignores letter case, so apple and Banana sort the way a person expects.

How to use the sort lines alphabetically

  1. Paste your lines.
  2. Choose the sort order.
  3. Press Calculate and copy the result.

How the sort lines alphabetically works

Alphabetical sorting uses locale aware comparison that ignores case. Numeric sorting reads the number at the start of each line. Length sorting compares the number of characters.

Worked example

pear, apple, banana, cherry becomes apple, banana, cherry, pear in A to Z order.

Common uses of the sort lines alphabetically

  • Alphabetizing a list of names, tags or glossary terms.
  • Sorting keyword lists to spot variations.
  • Ordering numbers in a list from low to high.
  • Preparing sorted data for comparison.
  • Organizing bibliography entries.

Tips and common mistakes

For numbers, use the numeric option. Plain A to Z puts 10 before 2.

Empty lines are removed before sorting.

Background: what to know before you rely on it

Sorting looks simple, but there are rules. Computers sort by character codes unless told otherwise, which puts capital letters before lowercase ones and puts 10 before 2. Human friendly sorting ignores case and compares numbers by value. Languages differ too: in Swedish, the letter a with a ring comes after z, while in German it is treated like a regular a. This tool uses your browser's language aware comparison, so results usually match what you expect. For very large lists, sort in a spreadsheet or database for more control.

Private, free and fast

This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all text tools, or browse the full list of tools.

Frequently asked questions

Is the sort case sensitive?

No.

Can I sort numbers?

Yes, choose numeric.

Can I reverse the order?

Choose Z to A.

Related tools

Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Always proofread output before you publish.