InputTestHub

Text Sorter

Sorts lines alphabetically, numerically, by length or randomly, ascending or descending, with case and duplicate options.

Text Nothing uploaded No sign-up Free, unlimited
Text tool
Paste something on the left to see the result.
In short Sorting lines puts a list in order alphabetically, numerically, by length or randomly, ascending or descending. The distinction that catches people is alphabetical against numerical: sorted as text, 10 comes before 2, because sorting compares character by character and "1" is before "2". That is correct alphabetical behaviour and almost never what you want for a list of numbers, which is why a numeric mode exists. The same effect explains why version numbers and dates written as text sort wrongly, and why ISO dates — 2026-08-15 — were designed so that alphabetical and chronological order are the same thing. Case sensitivity is the other decision. A strict sort puts all the capitals before all the lowercase letters, so "Zebra" comes before "apple", because that is the order of their character codes. A case-insensitive sort gives the order a person expects. Sorting by length is the odd one out and is genuinely useful for finding outliers: the longest and shortest entries in a list are where the errors usually are.

How to use the Text Sorter

  1. Paste your text into the input box on the left.
  2. Adjust the options above the box if you need a different behaviour.
  3. The converted text appears on the right; press Copy to put it on your clipboard.

About the Text Sorter

The Text Sorter sorts lines alphabetically, numerically, by length or randomly, ascending or descending, with case and duplicate options. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Alphabetising a list of names or references.
  • Ordering file names naturally so file10 comes after file2.
  • Sorting a keyword list by length to find the long tail.

Frequently asked questions

Do I need an account to use the Text Sorter?
There is no cost and no cap. The Text Sorter is not a demo of a paid product, so nothing is held back or watermarked.
Can you see what I put into this page?
No. The Text Sorter runs entirely in your browser using JavaScript. Nothing is transmitted, logged or stored, which you can verify yourself in the Network tab of your browser's developer tools.
What is the Text Sorter used for?
Typical uses: alphabetising a list of names or references. Ordering file names naturally so file10 comes after file2. Sorting a keyword list by length to find the long tail. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Can I use the Text Sorter on mobile?
Yes. The page is responsive and the page works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related text tools

All 92
01

Case Converter

Converts text between twelve cases: UPPER, lower, Title, Sentence, camelCase, PascalCase…

02

Uppercase Converter

Converts any text to UPPERCASE instantly, keeping numbers, punctuation and line breaks exactly…

03

Lowercase Converter

Converts any text to lowercase, including text that was typed with Caps Lock on by mistake.

04

Title Case Converter

Converts headings to proper Title Case using AP and Chicago rules, keeping short words like…

05

Sentence Case Converter

Rewrites text in sentence case: first letter of each sentence capitalised, the rest lowercase…

06

camelCase Converter

Turns any phrase into camelCase for JavaScript, Java and JSON keys, stripping spaces, hyphens…

07

PascalCase Converter

Converts phrases to PascalCase (UpperCamelCase) for class names, React components and type…

08

snake_case Converter

Converts text to snake_case for Python variables, database columns and file names.

09

kebab-case Converter

Converts text to kebab-case for URLs, CSS class names and HTML attributes.

10

CONSTANT_CASE Converter

Converts text to SCREAMING_SNAKE_CASE for environment variables, constants and configuration…