Skip to content

Text Sorter

Sort lines of text from A to Z, Z to A, or by length, with numbers inside lines sorted by value and accents following your language’s rules.

Runs in your browser. Your data is not uploaded.How our tools work

0 lines

Order
Options

How do I sort lines alphabetically?

Paste your list with one item per line and choose A → Z, Z → A, shortest first or longest first. Whole lines are sorted, never the words inside them. By default capital and small letters sort together, and numbers inside lines sort by value. Copy the sorted list when you’re done.

Key features

  • Four orders

    Sort A to Z, Z to A, shortest to longest or longest to shortest.

  • Natural number order

    Numbers in lines sort by value, so Chapter 2 comes before Chapter 10. Turn it off for plain character order.

  • Accents handled

    Letters with accents sort next to their plain versions, as in a dictionary, instead of after Z.

  • Equal lines stay in order

    Lines that count as equal, such as Apple and apple, keep the order they had in your list.

Common uses

  • Put a list of files or chapters in number order
  • Find the longest or shortest entries in a list

How accents and numbers are sorted

Sorting follows your browser’s language rules, the same ones a dictionary uses. Émile sorts next to Emile rather than after Zoe, and “file2, file10, file9” becomes “file2, file9, file10” with numbers sorted by value. Without that option, characters are compared one by one, so file10 comes before file2.

Frequently Asked Questions

Are capital letters sorted separately?

Not by default: Apple and apple sort together and keep their original order. Turn on “Case-sensitive” and words that differ only in capitals are ordered small letter first: apple, Apple, banana, Banana. Capitals are not moved to a separate group.

Where do lines that start with numbers or symbols go?

Before the letters. In A → Z order, lines starting with punctuation or symbols come first, then lines starting with digits, then A to Z, following the same rules as a dictionary. Empty lines are removed by default; if you keep them, they sort first.

Does it sort the words inside each line?

No. Each line is kept exactly as it is and moved as a whole.

Can it remove duplicates too?

No, it keeps every line. Use Remove Duplicate Lines to delete repeats, before or after sorting.

Sources

Last updated: