Sort Lines Alphabetically

Sort a list of lines alphabetically, numerically, by length or in reverse, with case and blank-line options.

Paste a list and put it in order. Alphabetical, numeric, by length or simply reversed — all in your browser.

  • 0Lines in
  • 0Lines out

How Does It Work?

  1. Paste your listOne item per line. Names, tasks, keywords, file names, numbers.
  2. Choose an orderAlphabetical is the default. Numeric sorting reads the first number in each line, so "item 10" comes after "item 9".
  3. Copy the sorted listUse it straight away, or feed the result back in to apply a second pass.

What Is It Used For?

Sorting in a spreadsheet means opening one, pasting, sorting, copying back. For a quick list this page is faster, and its natural ordering handles the case that plain alphabetical sorting always gets wrong: numbers inside text, where "Chapter 10" would otherwise land between "Chapter 1" and "Chapter 2".

  • Alphabetising a list of names, tags or references.
  • Ordering file names or version numbers naturally.
  • Sorting numbers pasted out of a report.
  • Reversing a list you already have in order.
  • Shuffling a list to pick a random order, for example a running order or a draw.

Examples

InputModeResult
banana, apple, cherryA → Zapple, banana, cherry
item 2, item 10, item 1A → Z (natural)item 1, item 2, item 10
30, 4, 200Numeric, smallest first4, 30, 200
aaa, b, ccShortest firstb, cc, aaa

Frequently Asked Questions

Is the sort case sensitive?

Not by default, so "apple" and "Apple" sort next to each other. Turn on "Case sensitive" if uppercase should be ordered separately.

How does natural sorting work?

Numbers inside text are compared as numbers rather than characters, so "item 10" comes after "item 9" instead of after "item 1".

How are accented characters handled?

They sort next to their base letter, so "é" is grouped with "e" rather than pushed to the end of the list.

What happens to lines without a number in numeric mode?

They are moved to the end and sorted alphabetically among themselves.

Can I sort and deduplicate at once?

Yes — switch on "Remove duplicates" and both happen in a single pass.

Free. No registration. This tool runs entirely in your browser, so the data you enter stays on your device.