Free · No sign-up · Private

Text Sorter

Sort lines alphabetically, by length or numerically, ascending or descending.

Quick answer

Paste one item per line, choose Alphabetical, Length or Numeric, and pick ascending or descending order. Alphabetical sorting is locale-aware, so accented letters sit next to their plain versions, and numeric sorting puts 2 before 10, unlike plain text sorting.

Text SorterRuns in your browser
Sorted lines
apple banana cherry date

Step by step

How to use the Text Sorter

01

Paste your lines.

02

Choose a sort mode and direction.

03

Get the sorted list.

Worked examples

The same list sorted three ways

ModeResult
Alphabetical (A to Z)10, 2, apple, Banana
Numeric (ascending)2, 10, then text lines
Length (shortest first)2, 10, apple, Banana

Good to know

Why 10 comes before 2 alphabetically

Alphabetical sorting compares characters one at a time, and “1” comes before “2”. For numbers, choose Numeric so they are compared by value.

Sort and remove duplicates

To get a sorted list with no repeats, run Remove Duplicate Lines first, then sort the result here.

Sorting by length

Length mode orders lines by the number of characters, which is handy for finding the shortest or longest entries in a keyword list, spotting truncated values in exported data, or arranging headings and labels from short to long for a design.

FAQ

Frequently asked questions

Is the sort case-sensitive?

Alphabetical mode uses your browser’s locale rules, which place “apple” and “Apple” next to each other.

Can I reverse a list?

Choose Descending to sort Z to A or largest first.