Text Sorter

Sort lines of text alphabetically, numerically, by length, or reverse. Remove duplicates too.

About this calculator

Sort lines of text alphabetically, numerically, by length or in reverse. Options let you ignore case, trim spaces and remove duplicates at the same time.

Sorting a list of names, SKUs, tags or numbers by hand is slow and error-prone. Paste the list, choose the order and copy back the result.

How to use it

  1. Paste your lines, one item per line.
  2. Choose Sort By and any options.
  3. Press Sort and copy the output.

Sort modes

Alphabetical sorts by letters, numeric by number value (so 10 comes after 9, not after 1), and length by number of characters. Reverse flips the order. Ignoring case treats Apple and apple the same.

Worked example

pear, apple, fig

A to Zapple, fig, pear
Z to Apear, fig, apple
By lengthfig, pear, apple

Tips and common mistakes

  • Use numeric sort for numbers; alphabetical puts 10 before 2.
  • Tick Ignore case so capitals do not jump the queue.
  • Trim first to avoid leading spaces affecting order.
  • Remove duplicates and sort in one pass.
  • Sort by length to find the longest and shortest items.

Frequently asked questions

How do I sort a list alphabetically?

Paste the lines and choose Alphabetical.

Why does 10 come before 2?

Alphabetical sort compares characters. Use numeric sort.

Can I sort in reverse?

Yes.

Can I remove duplicates while sorting?

Yes, tick the option.

Is the sort case-sensitive?

Optional.

How many lines can it sort?

Thousands.

Related tools