Sort Lines Alphabetically

Paste a list and put it in alphabetical order in either direction. Sorting uses the locale-aware comparison built into the browser, so accented letters and mixed capitalization order the way a person expects rather than in raw character-code order.

This page is preset to Sort A to Z. Paste your text, then run it with one press.

Input

Words
0
Characters
0
No spaces
0
Lines
0
Actions

Output

Words
0
Characters
0
No spaces
0
Lines
0

How to use it

  1. Paste the list, one item per line.
  2. Press Sort A to Z or Sort Z to A.
  3. Use Reverse Order if you only want to flip the existing sequence.
  4. Copy or download the sorted list.

How mixed case sorts

Comparison is locale-aware, not ASCII-based. In plain ASCII, every uppercase letter sorts before every lowercase one, which puts 'Zebra' before 'apple'. Locale comparison treats case as a lower-priority difference, so you get a natural A, a, B, b sequence.

Sorting is not deduplication

Duplicate lines survive sorting and end up next to each other. If you want a unique sorted list, remove duplicates first and sort afterwards; the reverse order also works but makes duplicates harder to spot while you review the result.

Numbers sort as text

This is an alphabetical sort, not a numeric one, so 10 comes before 2 because the comparison reads character by character. For numeric lists, pad the values with leading zeros first, which makes text sorting match numeric order.

Frequently asked questions

Does sorting remove duplicates?

No. Duplicates stay in the list, adjacent to each other. Remove Duplicates is a separate action.

Why does 10 come before 2?

Lines are compared as text. Character by character, '1' is lower than '2', so 10 sorts first. Pad with zeros to sort numerically.

Is the sort stable for equal lines?

Modern browsers use a stable sort, so identical lines keep their relative order.

Related tools

Browse all text tools or open the full cleaner with every action.