What is Text Sorter?

Text Sorter puts lines of text in order — alphabetical, numerical, or reversed. Turn case-sensitivity on or off, strip out duplicates, and sort lines that contain numbers by their actual value. Use it to tidy up a list, clean up data, or reorder log entries.

Choose between alphabetical (A-Z or Z-A) and numerical (ascending or descending). Numerical sorting pulls digits out of mixed strings, so '20 items' and '3 items' sort in real numeric order, not as text. The case-sensitive toggle decides whether 'apple' and 'Apple' count as duplicates; the dedupe option drops repeats while sorting.

How to use

  1. Paste your lines of text into the input area. Each line counts as one item.
  2. Choose your sort method — alphabetical A-Z, Z-A, numerical ascending, or numerical descending — and toggle options like case sensitivity or duplicate removal.
  3. Copy the sorted output or download it as a text file. The original input is preserved so you can try different sort options.

When to use

  • Cleaning up an email list with duplicates and inconsistent capitalisation.
  • Sorting a CSV column saved as plain text, like product SKUs or version numbers.
  • Alphabetising a glossary, reading list, or contributor file before pasting it somewhere.

Result

Paste a grocery list like 'Bananas, Apples, Cherries' (one per line) and sort A-Z to get 'Apples, Bananas, Cherries'.

FAQ

How does numerical sort handle lines like 'Item 12' or '$1,200'?
It strips non-digit characters and parses what remains as a number, so 'Item 12' and 'Item 3' sort as 3 then 12. '$1,200' becomes 1200. If parsing fails (no digits at all), that line is treated as zero.
Does it sort lines or whole words?
Lines. Each line is one item, regardless of how many words it contains. Lines that are blank or only whitespace are dropped before sorting, so the output never contains stray empty rows.
Will the original order be preserved if I turn sorting off?
The input panel always keeps your original text untouched, even after sorting. Use Copy or Download to take the sorted result, then come back to the input to try a different sort method.
How does case sensitivity work with the dedupe option?
With case off, 'Apple' and 'apple' are seen as duplicates and only the first occurrence survives. Turn it on if you want to preserve both. Trailing whitespace is always stripped before comparison.
Will alphabetical sorting work with non-Latin scripts?
Yes. The tool uses locale-aware comparison, so Chinese, Cyrillic, Arabic, and other scripts sort in their natural order rather than by raw Unicode value. Mixed-script lines fall back to standard locale rules.

Related Tools