Skip to content
ToolMug

Sort Lines

Put any list in order. Sort alphabetically with proper handling of accents, use natural order for numbered items, sort by length, reverse the list or shuffle it randomly.

Runs in your browser — nothing you enter is uploaded

How to use

  1. Paste your list, one item per line.
  2. Choose a sort order.
  3. Optionally remove duplicates, trim spaces or remove empty lines.
  4. Copy or download the sorted list.

Options explained

A → Z / Z → A
Alphabetical order using your language's rules, so accented letters sort next to their base letters (é with e).
Natural
Compares numbers inside text by value, so item2 comes before item10. Plain alphabetical order puts item10 first.
By length
Shortest lines first; lines of the same length are sorted alphabetically.
Shuffle
Random order using the browser's secure random generator. Click Shuffle again for a new order.

Examples

Input A → Z Natural
file10, file2, file1 file1, file10, file2 file1, file2, file10

Frequently asked questions

Why does item10 come before item2?

Plain alphabetical sorting compares character by character, and "1" comes before "2". Choose Natural to compare the numbers by value.

Is the shuffle fair?

Yes. It uses the Fisher–Yates algorithm with cryptographically secure random numbers, so every order is equally likely.

Is my text uploaded?

No. Sorting runs in your browser.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools