Skip to content
ToolzKit

Text

Text Sorter

Sort lines of text alphabetically, numerically, by length, or shuffle them randomly.

Input

Output

Sorted lines appear here.

Paste a list of lines above to sort them.

About the Text Sorter

Text Sorter reorders lists of lines using several common strategies: standard alphabetical order using locale-aware comparison, numeric order for lists of numbers, sorting by line length, reversing the current order, or shuffling lines randomly. It's useful for organising lists, preparing test data or randomising the order of items.

How to use it

  1. 01Paste your list of lines into the input panel.
  2. 02Choose a sort mode from the dropdown, such as alphabetical, numeric or random shuffle.
  3. 03Adjust case-sensitivity, trimming and blank-line options as needed.
  4. 04Copy or download the sorted result.

Features

  • Alphabetical A-Z and Z-A sorting using localeCompare for correct language-aware ordering
  • Numeric sort that parses leading numbers from each line
  • Sort by line length, reverse existing order, or randomly shuffle lines
  • Case-sensitivity, line trimming and blank-line filtering options

Practical examples

Alphabetising a name list

Sort a list of names into alphabetical order for a directory or roster.

Randomising quiz questions

Shuffle a list of questions or items into a random order for variety.

Limitations

  • Numeric sort only parses a leading number from each line; lines without a recognisable number are treated as zero.
  • Random shuffle produces a different result every time it runs and cannot be seeded for reproducibility.

Privacy

Sorting is performed entirely client-side; your list never leaves your browser.

Read the full privacy policy for how the site as a whole handles data.

Frequently asked questions

How does alphabetical sorting handle accented characters?

It uses JavaScript's localeCompare, which orders accented and non-Latin characters sensibly for most languages.

Can I sort a list of numbers correctly?

Yes, choose numeric sort mode, which parses each line as a floating-point number before comparing.

Will trimming change my original text?

Trimming only affects the output shown in this tool; your original pasted text in the input box is left untouched until you edit it.