ToolsKit

Text Sorter

Sort lines in ascending or descending order.

Sort lines alphabetically, in reverse or by length. Quickly organise lists of names, keywords, tags and data rows.

Loading the interactive tool… This page needs JavaScript to run the Text Sorter.

How to use Text Sorter

  1. Paste or type your text into the editor.
  2. Choose the transformation or options you need.
  3. Run the tool and review the result.
  4. Copy the finished text into your document, CMS, or project.

How Text Sorter works

Each line of the input is treated as one item and the lines are sorted alphabetically using locale-aware comparison, so accented letters sort sensibly. Tick Descending for Z to A order. Sorting is applied to whole lines, not words, and blank lines move to the top in ascending order. The original text is not changed until you copy the result.

Worked example

Input: pear, apple, fig on three lines with Descending on → Output: pear, fig, apple. With Descending off the result is apple, fig, pear.

Common uses

  • Alphabetize a reading list or glossary.
  • Order a list of names before comparing it to another list.
  • Sort configuration entries or domain names into a predictable order.

Best for

  • text workflows
  • quick text sorter tasks
  • browser-based utility work

Tips for better results

  • Paste representative text rather than a small sample when checking counts or formatting.
  • Review the result before replacing your original content.
  • Keep a copy of important source text before bulk transformations.

Frequently asked questions

Can I sort in descending order?

Yes, choose Z–A to reverse the order.

How are numbers sorted?

Lines are sorted as text unless you enable numeric sorting, so “10” may come before “2” otherwise.

Does it remove duplicates?

Use the Remove Duplicates tool first or after sorting to also deduplicate the list.

Related tools

Explore tool categories