Tools › Text
Sort Lines
Sort lines, comma-separated items or words A–Z, Z–A, naturally (item 2 before item 10), by last word, by character code, by number (also by absolute value), by length or word count, by date, reversed or shuffled.
About this tool What it's for, how to use it and an example
What it's for
Sort a list in whatever order you need: alphabetically, naturally (so item 2 comes before item 10), by
number, length, word count or date, by last word, reversed or shuffled.
- When you’re putting a list of names in order by surname.
- When you’re sorting file names or version numbers that contain numbers.
- When you’re shuffling a list to pick a random order for a draw or a rota.
How to use it
Paste text, choose a Sort order and what the items are: lines, comma-separated items, or words. The result updates straight away. Options let you ignore case, ignore “The”, “A” and “An” at the start, remove duplicates and blanks, and trim spaces. Use as input sorts the result again, and Shuffle again gives a new random order.
Example
Paste this:
item 10
item 2
Item 1
item 20
A–Z gives Item 1, item 10, item 2, item 20, because it compares character by character. Natural
A–Z gives Item 1, item 2, item 10, item 20, the order a person would expect.
Good to know
Number sorts use the first number in each item (such as -3.5, 1,200 or 2e6), and items with none go last. Date sorts read most written dates, such as 2026-10-02 and 2 Oct 2026. Items that tie keep their original order.
Number sorts use the first number in each item (-3.5, 1,200, 2e6);
items with none go last. Date sorts read most written dates, such as 2026-10-02 and 2 Oct 2026.
Ties keep their original order.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.