Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

Sort Text Lines

Put a list in order: A to Z, Z to A, shortest first, by number, or a random shuffle. Optionally trim lines and drop blanks or duplicates.

Runs in your browserInstantNothing saved or sent
1

Lines & sort options

Limits

  • Numeric sort treats lines that do not start with a number as 0, so they group at the start (A–Z of those ties is not applied).
  • Natural sort only special-cases decimal digit runs; it does not parse dates, versions with letters (v1 vs v1b) or locale-specific numerals.
  • Shuffle is not a secure mixer for cryptography or lotteries that need an audited draw.
  • Very large pastes (over about 500,000 characters) are refused so the tab does not freeze. Split the work into smaller pieces if you hit that limit.
2

Sorted lines

How to use Sort Lines

  1. Paste a listPaste one item per line, or load a local .txt file.
  2. Choose a sortPick A–Z, Z–A, length, numeric, natural order, reverse or shuffle. Tick case-insensitive, trim, drop blanks or unique if you need them.
  3. Copy or downloadCopy the result or download it as a .txt file.

Alphabetical, numeric and natural sorts

A–Z and Z–A use your browser’s Unicode collation, so accented letters sort in a locale-aware way. Numeric sort reads a number at the start of each line (so “10.5 apples” counts as 10.5). Natural sort compares digit runs as numbers inside the text, so “item2” comes before “item10”.

Shuffle uses the browser’s cryptographically strong random values when they are available. Re-shuffling gives a new order each time. Unique keeps the first occurrence of a line (after trim and case options are applied).

Frequently asked questions

What is the difference between numeric and natural sort?

Numeric sort looks at a number at the beginning of the line. Natural sort finds every run of digits anywhere in the line, so “ch2-s10” comes after “ch2-s3”.

Is my text sent anywhere?

No. Everything runs in your browser tab with JavaScript. Nothing you type or paste is uploaded, logged or stored on our servers.

How does Unique decide which line to keep?

The first line that matches, after trimming and the case-insensitive option, is kept. Later duplicates are dropped.

Can I sort CSV columns?

No. Each line is sorted as a whole. Split the file into one column per line first, or use a spreadsheet.

Related tools

All tools