Skip to content

Text Sorter

Sort lines A–Z, Z–A, numerically, naturally or by length — or reverse and shuffle them.

AvailableRuns in your browserFree · No sign-up

Text Sorter

Sort order

A to Z: Alphabetical, ascending (language-aware).

Options

Uppercase sorts before lowercase when the letters are otherwise equal.

Compare lines without their leading and trailing spaces.

Remove leading and trailing spaces from each sorted line.

Keep only the first of any repeated lines.

Flip the final order.

Empty lines
0 lines
0 lines
Input lines
0
Output lines
0
Empty lines
0
Duplicates removed
—

Your data is processed locally in your browser and is not uploaded to OZVILO servers.

How to use the Text Sorter

  1. 1Paste the lines you want to sort.
  2. 2Pick a sort order: alphabetical, numeric, natural, by length, reverse or shuffle.
  3. 3Adjust options such as case sensitivity, trimming, empty lines and duplicate removal.
  4. 4Copy or download the sorted lines.

Examples

  • Natural sort

    Input
    item10 item2 item1
    Result
    item1 item2 item10
  • Numeric sort

    Input
    10 9 -3 2.5
    Result
    -3 2.5 9 10

Text Sorter features

  • Language-aware alphabetical sorting (A–Z and Z–A) that keeps accented letters with their base letters
  • True numeric sorting with decimals, negatives and thousands separators
  • Natural sorting for mixed text and numbers, and sorting by length
  • Reverse the order or shuffle randomly with an unbiased Fisher–Yates shuffle
  • Options for case, trimming, empty lines, duplicate removal and reversing the result

Frequently asked questions

What's the difference between alphabetical and natural sort?

Alphabetical sort compares digits as characters, so “item10” comes before “item2”. Natural sort reads numbers as numbers, so “item2” comes first.

How does numeric sort handle lines without numbers?

It sorts by the first number in each line. Lines without a number are placed after the numbered lines, in their original order.

Is the shuffle truly random?

It uses the Fisher–Yates algorithm with your browser's cryptographic random number generator, so every order is equally likely.

Are equal lines kept in their original order?

Yes. Sorting is stable: lines that compare as equal stay in the order they were in.