HomeAll toolsText Sorter

Text Formatting

Free text line sorter

Reorder a line-based list alphabetically, in reverse alphabetical order, or by reversing the order in which the lines were entered.

Arrange lines alphabetically or reverse order.

Output

Your result will appear here when you enter text.

Three ways to reorder lines

A–Z sorts lines alphabetically without distinguishing uppercase from lowercase or accented from unaccented letters. Z–A is the exact reverse of that sorted result. Reverse order does not sort: it flips the lines exactly as entered.

  • A–Z: arrange names, titles, or labels in ascending order.
  • Z–A: reverse the sorted A–Z result.
  • Reverse order: put the last entered line first, regardless of its text.

Natural number order

Natural number order is enabled by default. It compares digits as numbers within the line, so “item 2” comes before “item 10”. Turn it off for standard character-by-character alphabetical sorting.

Example input

item 10
item 2
item 1

Result

item 1
item 2
item 10

Blank lines and line breaks

Line endings are normalized before sorting. By default, empty lines are kept and sorted with the other lines; enable Remove empty lines to discard blank or whitespace-only lines. The output is joined without adding a trailing newline.

Frequently asked questions

Does Reverse order mean Z–A?

No. Reverse order flips the original line sequence without sorting. Choose Z–A for reverse alphabetical order.

Why does item 2 come before item 10?

Natural number order is enabled by default, so numeric portions are compared as numbers. Turn it off to sort character by character.

Can I keep blank lines?

Yes. Remove empty lines is unchecked by default, so blank lines are kept. Enable it to remove empty and whitespace-only lines.

Explore other text tools

Each tool opens on its own page, so you can switch tasks without losing your way.