Text & Content

Sort Lines

Paste a list and put it in order — alphabetically, by length, reversed or shuffled. Numbers sort the way people expect, and you can number the result as you go.

Your list

Sorted list

Lines in
—
Lines out
—

Putting a list in order

Sorting a list is the kind of job a spreadsheet makes heavy going of: paste, split into columns, sort, copy back. Here you paste the lines, pick an order and copy the result. Everything happens in the browser, so a list of customers or passwords never leaves your machine.

What each option does

Natural number ordering

Plain alphabetical sorting puts "item 10" before "item 2", because it compares one character at a time. With natural ordering on, runs of digits are compared as numbers, so item 1, item 2 and item 10 land in the order you expect. That matters for file names, invoice numbers and version strings.

How to use the line sorter

  1. Paste your list, one item per line.
  2. Pick the order and adjust the switches — trimming spaces and dropping blank lines are on by default.
  3. Copy or download the result, or tick "number the result" to get a numbered list.

Related jobs

Frequently asked questions

How do I sort a list alphabetically online?

Paste the list with one item per line, choose "A to Z" and copy the result. Nothing is uploaded — the sorting happens in your browser.

Why does item 10 come before item 2 in some tools?

Because plain alphabetical sorting compares characters, and "1" comes before "2". Tick "sort numbers naturally" here and digits are compared as numbers instead.

Can I shuffle a list randomly?

Yes — choose "Shuffle at random". Each change reshuffles, so you can keep drawing until you are happy with the order.