Sort lines

Put names, keywords, file names or any list in order with one click, with numbers sorted the way people expect: 2 before 10.

Private: works in your browser, nothing is uploaded.

How to use the Sort Lines tool

  1. Paste your list, one item per line.
  2. Choose the options, such as natural number order or removing duplicates.
  3. Click A → Z, Z → A, By length, Reverse order or Shuffle.
  4. Copy the sorted list.

Natural order for numbers

Simple sorting compares character by character, so “item 10” comes before “item 2”. With natural number order, numbers inside the text are compared as numbers: item 1, item 2, item 10. This is what you want for file names, chapters, invoice numbers and versions.

Sorting that respects your language

The tool uses your browser’s language rules, so accented letters and letters such as ä, ñ, ø or ё are sorted where people expect them instead of after Z.

More ways to order a list

  • By length: shortest lines first, useful for finding very long or very short entries.
  • Reverse order: turns the list upside down without sorting it.
  • Shuffle: a random order, for example to draw names or mix quiz questions.

Privacy

Everything runs in your browser. Your text is not sent to our server or stored anywhere.

Practical examples

  • Sort a guest list or class list alphabetically before printing.
  • Order version numbers or file names like chapter-2, chapter-10 correctly with natural order.
  • Find the longest product titles that will not fit in a layout by sorting by length.
  • Shuffle a list of names to choose the order of presentations fairly.

Sorting by last name

The tool sorts whole lines from the first character. To sort “Anna Schmidt” by last name, write names as “Schmidt, Anna” first, or split first and last names into columns in a spreadsheet and sort there.

Frequently asked questions

Is upper and lower case taken into account?

Not by default: “apple” and “Apple” are sorted together. Tick “Case-sensitive” to separate them.

Can I sort a column from Excel?

Yes. Copy the column, paste it here and copy the result back. For tables with several columns, sort in the spreadsheet itself.

Is the shuffle really random?

It uses the browser’s random number generator with a fair shuffle (Fisher–Yates). It is fine for draws among friends, but not for anything with legal requirements.

How do I remove duplicates without sorting?

Use Remove Duplicate Lines, which keeps the original order.

Is my list sent anywhere?

No. Sorting happens in your browser.

Can I sort numbers?

Yes. With natural order, lines that contain numbers are sorted by their value, so 9 comes before 10.