Text Sorter

Sort lines alphabetically or numerically, ascending or descending.

Text Sorter is a free online tool that puts any list of lines into order in a single click. Choose ascending A to Z or descending Z to A and the tool rearranges your text instantly, keeping the full content of every line intact while only changing the sequence they appear in.

It suits writers alphabetising glossaries and indexes, marketers organising keyword and tag lists, analysts ordering numeric data, and anyone who needs a tidy, predictable list without opening a spreadsheet. If you regularly paste in raw lines and want them sorted reliably the same way every time, this tool removes the tedious manual rearranging.

Everything runs inside your web browser using JavaScript. The tool splits your text on line breaks, applies your chosen comparison, then reorders the lines and shows the result live. With numeric mode, lines are read as numbers; otherwise they are compared as text. Nothing is uploaded, so your list stays private on your own device the whole time.

Features

  • Ascending A to Z and descending Z to A ordering let you arrange any list in the direction you prefer.
  • A case-insensitive option produces natural alphabetical order so capital letters do not jump ahead of lowercase ones.
  • Numeric mode reads each line as a number and orders it by actual value rather than character by character.
  • An optional remove empty lines setting drops blank rows while sorting so the result stays compact and clean.
  • The full content of every line is preserved exactly as it reorders, so no characters are altered or trimmed.
  • Non-numeric lines in numeric mode are placed after the numbers and ordered alphabetically among themselves sensibly.
  • You can upload a plain text file to sort its lines locally instead of pasting the list by hand.
  • All sorting runs in the browser with no sign-up or upload, and the result can be copied or downloaded.

How to use Text Sorter

  1. Paste your list into the input box with one item per line, or upload a plain .txt file to load it.
  2. Pick the order from the dropdown, choosing A to Z for ascending or Z to A for descending arrangement.
  3. Enable Ignore case for a clean alphabetical sort where capitalisation does not affect the position of each line.
  4. Turn on Numeric sort when your lines are numbers so they are ordered by value rather than as plain text.
  5. Enable Remove empty lines if you want a compact result with no blank rows left in the sorted output.
  6. Review the sorted lines, then copy them to your clipboard or download them as a text file for later use.

Benefits

  • Writers and editors alphabetise glossaries, indexes, bibliographies and reference lists without rearranging entries one by one.
  • Marketers organise keyword, tag and audience lists into a predictable order that is far easier to scan and review.
  • Analysts sort numeric data quickly to find the smallest and largest values without opening a full spreadsheet application.
  • Anyone tidying a messy list gets consistent, repeatable ordering in seconds rather than dragging rows around manually.
  • Teachers and students arrange names, terms or vocabulary alphabetically for handouts, study sheets and class registers.
  • Privacy-conscious users sort confidential lists locally because the data is never transmitted to any external server.

Numeric sorting and alphabetical sorting answer different questions. Sorting as text places 10 before 2 because it compares character by character, while numeric mode reads each line as a number so the order matches its actual value. Choose the mode that fits your data: alphabetical for words and codes, numeric for prices, quantities, scores and other figures where mathematical order is what you actually need.

Common uses include alphabetising a list of customer names, ordering keywords for a content plan, sorting product codes, and arranging numeric measurements from low to high. Combining Ignore case with A to Z gives the cleanest alphabetical result for mixed-case text, and enabling Remove empty lines first ensures stray blank rows do not cluster awkwardly at the top or bottom of your sorted output.

All sorting happens locally inside your browser, so your list is never uploaded, stored or logged, which keeps confidential data safe. Sorting is reliable for plain lines, but be aware that in numeric mode any line that is not a recognisable number is grouped after the numbers and sorted alphabetically, so mixed lists of text and figures still produce a sensible, predictable arrangement rather than an error.

Frequently asked questions

Related tools