FREE TOOLS. ZERO LIMITS.
No Signup RequiredNo Watermarks
ToolzNova · Text & developer tools

Sort Lines Online

Sort a list alphabetically from A to Z, Z to A, or by number. Natural sorting puts “item 2” before “item 10”, the way people expect.

Sort Lines

Free sort lines that runs in your browser. Nothing is uploaded.

A–Z · Z–A · 1–9

Lines are sorted as whole lines. In numeric mode, lines that aren’t numbers may end up in unexpected places.

How to sort lines online

1Paste your list

Add one item per line.

2Pick a sort mode

Choose A → Z, Z → A or Numeric ascending.

3Copy the sorted list

Copy the result and paste it back into your document.

How the sort modes work

A → Z and Z → A use natural sorting: numbers inside text are compared by value, and capital and small letters are treated alike.

Numeric ascending is for lists that contain only numbers, such as prices or scores.

InputA → Z (natural)Plain text sort
item 10, item 2, item 1item 1, item 2, item 10item 1, item 10, item 2
banana, Apple, cherryApple, banana, cherryApple, banana, cherry
10, 9, 1009, 10, 10010, 100, 9

Sorting lists quickly

This short guide explains what the sort lines does, how to get the best result and when another tool is a better fit.

Why natural sorting helps

Ordinary computer sorting compares text one character at a time, so ‘file 10’ comes before ‘file 2’ because 1 is smaller than 2. That looks wrong to people. This tool uses natural sorting for the A → Z and Z → A modes, which reads numbers inside text as whole values. ‘Chapter 2’ comes before ‘Chapter 10’, just as you would sort them by hand.

Sort Lines – List to A→Z
How the sort lines works: List in, A→Z out.

It also ignores the difference between capital and small letters, so ‘apple’ and ‘Apple’ sit together instead of all capitals coming first.

Sorting numbers

Choose Numeric ascending for a list of plain numbers, such as test scores or prices without currency symbols. Each line is read as a number and sorted smallest to largest. Lines that aren’t numbers can’t be placed reliably, so remove headings and units like ‘kg’ or ‘£’ first.

Want largest first? Sort numerically, then use Text Reverser in Line order mode to flip the list.

A worked example

A teacher has a class list typed in the order students arrived: 28 names, some with lowercase first letters. Pasting it and choosing A → Z gives a tidy alphabetical register in seconds, with ‘amir’ and ‘Amira’ next to each other rather than split by capitalisation. Running Case Converter in Title Case afterwards fixes the lowercase names.

For a list of sorted scores, Numeric ascending puts 9 before 10 and 100, not after them.

Sorting tips for spreadsheets and documents

To sort a single column from a spreadsheet, copy it, sort it here and paste it back, but only if the other columns don’t need to move with it. For tables, use the spreadsheet’s own sort so rows stay together. In Word or Google Docs, a sorted list pasted back keeps one item per line, ready to turn into bullets.

Sorting is also a good check on data quality. After sorting a list of names or product codes, typos and near-duplicates often sit right next to each other, such as ‘Jonathon’ and ‘Jonathan’, so they are easy to spot and fix.

Combining with other tools

Sorting works well with other list tools. Remove duplicates before sorting to get a clean, unique list, or sort first to make duplicates easy to spot by eye. Sorting keeps every line, including blank ones, which usually move to the top in A → Z mode.

  • Natural A–Z for names and titles
  • Numeric for plain number lists
  • Remove duplicates first for a clean result

Further reading: How natural sort order works. It explains the format behind this sort lines in more detail.

Good for

Names

Alphabetise class and guest lists.

Keywords

Group similar search terms.

Files

Order file names with numbers correctly.

Scores

Sort numbers smallest first.

Quick fixes

Blank lines at the top

Empty lines sort first. Delete them from the input or result.

Numbers in odd places

In Numeric mode, lines with text or units can’t be sorted. Remove units first.

Need largest first

Sort numerically, then flip the list with Text Reverser (Line order).

Copy button does nothing

Clipboard access was blocked. Select the result and copy it.

Frequently asked questions

What is natural sorting?

Numbers inside text are compared by value, so 2 comes before 10.

Is it case-sensitive?

No, capital and small letters are sorted together.

Can it sort Z to A?

Yes, choose Z → A.

How do I sort numbers largest first?

Sort numerically, then reverse the lines with Text Reverser.

Is my list uploaded?

No. The sort lines works entirely in your browser, so your file stays on your device.

Does it remove duplicates?

No. Use Remove Duplicate Lines first.

Does it sort accented letters correctly?

Yes, it uses your browser’s language-aware comparison.

Can I sort by the second word?

No, whole lines are sorted from the first character.

Why are blank lines at the top?

Empty lines sort before text.

Is there a limit?

No fixed limit.