Toolnido

Sort Lines Alphabetically, Naturally, by Number or by Length

Paste a list and sort the lines A to Z, by natural number order, by the number at the start, or by length. Remove repeats and blank lines, then copy the result. Runs in your browser.

Your text stays in this browser. Nothing is uploaded or sent to a server, and it is not put in the page address.

Your lines
How to sort

Reverse order flips your lines as they are. The other choices sort them.

When to use this

  • You have a list of names, files, tags or words and want it in order.
  • Your lines include numbers and plain A to Z puts item 10 before item 2.
  • You also want repeats and blank lines taken out in one step.

How to use

  1. Paste your lines, one item per line.
  2. Pick how to sort. Natural order treats the numbers inside a line as numbers.
  3. Tick descending, case, repeat and blank line options if you need them.
  4. Press Sort lines, then copy the result or download it as a text file.

Examples

Understanding the result

Alphabetical compares letters one by one using English order, with upper and lower case treated alike unless you turn that off. Natural order also reads runs of digits as whole numbers. Number at the start uses the first number on each line, and lines with no number go to the end. Length counts characters. Lines that tie keep their original order.

Limitations

FAQ

How do I sort lines alphabetically?

Paste the lines, choose Alphabetical and press Sort lines. Use the descending option for Z to A.

Why does item 10 come before item 2?

Plain alphabetical order compares one character at a time, and 1 comes before 2. Choose Natural order to sort the numbers by value.

Can I remove repeated lines at the same time?

Yes. Tick Remove repeated lines. The first copy of each line is kept, and the page says how many were removed.

What does Reverse the current order do?

It flips your list upside down without sorting it, so the last line becomes the first.

Is my text uploaded?

No. The sorting runs in your browser. Nothing you paste is sent to a server or stored, and it is not put in the page address.

Related tools