Text & Writing tool

Sort Text Alphabetically

The Sort Text Alphabetically tool puts any list in order. Paste words, names, keywords or lines of code and choose ascending (A-Z) or descending (Z-A), whether capitalisation matters, and whether numbers should be compared numerically rather than as text.

Numeric sorting is the option most people need for reference codes: without it, "10" sorts before "9" because characters are compared one by one. You can also drop duplicates or blank lines while sorting, which makes this a single-step clean-up for keyword lists, bibliographies and inventory exports.
Calculator

How to use the Sort Text Alphabetically

  1. Paste the lines you want to order.
  2. Choose ascending or descending order.
  3. Set case, numeric and duplicate options.
  4. Copy the sorted list back to your document.

About this tool

The Sort Text Alphabetically is built for speed and accuracy: every calculation runs in your browser, so your data never leaves your device and the result updates as you type. It works equally well on a phone, a tablet or a desktop, and it is free to use as many times as you like.

Common use cases

  • Alphabetising a bibliography or reference list.
  • Organising keyword or tag lists.
  • Sorting inventory codes in natural numeric order.
  • Cleaning and ordering exported data.

Tips for the best result

  • Use the latest figures you have - even a small change in rate or term can shift the outcome by hundreds.
  • For annual figures, divide by 12 to get a monthly number you can compare with the result.
  • Bookmark this page and revisit the calculation as the inputs change.

Frequently asked questions

Why does numeric sorting matter?

In plain text order "10" comes before "9" because the character "1" precedes "9". Numeric mode compares the numbers so 9 comes first.

Are blank lines removed?

Only if you tick "drop blank lines". Otherwise empty lines sort to the top.