Skip to content

Text Sorter

Order

Alphabetical

Input

Result

Example

How to use

  1. 1.

    Paste your lines into the Input panel, one item per line

  2. 2.

    Choose an Order: A → Z, Z → A, Short → Long, Long → Short, Reverse order, or Shuffle

  3. 3.

    Adjust Ignore case, Natural number order or Trim lines if the defaults do not suit your list

  4. 4.

    Copy the result - for Shuffle, click Shuffle again in the Result header to draw a new order

Common uses

  • ▸

    Alphabetising a list of names, options, or items

  • ▸

    Sorting CSS properties or import statements

  • ▸

    Randomising the order of items in a list

Frequently asked questions

Can I sort in reverse order?

The Z → A and Long → Short orders sort in descending order directly. Reverse order flips the line order of the input as written - it always reads from the input, not from a previous sort result.


Is sorting case-sensitive?

A → Z and Z → A ignore case by default, so lines that differ only in case keep the order you typed them in. Turning Ignore case off only settles those ties, in an order set by your browser language (in English, apple comes before Apple) - capitalized lines are not grouped ahead of lowercase ones as in a plain ASCII sort. Ignore case and Natural number order only change how line text is compared, so they are greyed out for Short → Long, Long → Short, Reverse order and Shuffle.


What does Trim lines do?

Trim lines (on by default) removes spaces and tabs from the start and end of every line, so indentation does not affect the order - but it is not kept in the result either. Switch it off when sorting indented lines such as CSS properties, so they keep their indentation.


Is my text sent to a server?

Sorting runs entirely in your browser. No data is transmitted or stored.


How are numbered lines and blank lines sorted?

With Natural number order on (the default), runs of digits are compared by their value, so "file2" sorts before "file10" and "2. item" before "10. item". Turn it off to compare digits character by character. Blank lines always go to the end in the four sorting orders, while Reverse order and Shuffle move them like any other line. A newline at the very end of the text stays at the end of the result.