Sort Lines Alphabetically — A to Z, Numbers, Length or Shuffle

Sort a list alphabetically, naturally, by number or length, reverse it or shuffle it randomly. Free, no sign-up, and your files never leave your device.

Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.

Sort any list A → Z or Z → A, in Natural order (so “file2” comes before “file10”), By number, by length (Shortest first / Longest first), flip it with Reverse order, or Shuffle it randomly. You can remove duplicates and empty lines at the same time.

Step by step

  1. Paste the list: One item per line in Input text.
  2. Choose an order: Click an option under Sort order. The result updates immediately.
  3. Fine-tune: Tick Case sensitive, Remove duplicates or Remove empty lines. With Shuffle, click Shuffle again for a new random order.
  4. Copy: Use Copy or Download under Result.

Handy for

Name lists

Put students, guests or contacts in alphabetical order.

File names

Sort numbered file names the way people expect with Natural order.

Prices or scores

Order lines by the first number in each.

Random draws

Shuffle a list to pick an order or a winner fairly.

Good to know

  • Alphabetical sorting follows your browser’s language rules, so accented letters sort next to their plain versions.

  • By number looks at the first number in each line; lines without a number go to the end.

  • Shuffling uses your browser’s secure random number generator.

Questions

What is natural sort?

It compares numbers inside text by their value, so “Chapter 9” comes before “Chapter 10” instead of after it.

Does it change my lines?

No — only their order (and, if you choose, removes duplicates or empty lines).

Is the shuffle truly random?

It uses a cryptographically secure random source with an unbiased shuffle, which is fine for everyday draws.

Is my text sent anywhere?

No. Everything is processed by your browser on your own device — nothing you type or upload is sent to a server, so it is safe to use with private notes, drafts and work documents.

More Text Tools tools

  • Remove Line Breaks — Join text that was broken into short lines — such as text copied from a PDF — while keeping real paragraphs.
  • Remove Extra Spaces — Collapse double spaces, trim lines and remove extra blank lines and odd Unicode spaces in one go.
  • Find and Replace Text — Find words or patterns in text and replace them everywhere, with match highlighting, whole-word and regex options.
  • URL Slug Generator — Turn titles into clean, SEO-friendly URL slugs — accents removed, spaces replaced, length limited.
  • Lorem Ipsum Generator — Generate lorem ipsum placeholder paragraphs, sentences, words or list items, as plain text or HTML.
  • Reverse Text — Reverse text by characters, words, lines or the letters inside each word — emoji stay intact.

All Text Tools tools