Line Sorter

Sort lines of text alphabetically, numerically, or by length.

Alphabetizing a bibliography, ordering a list of dependencies, ranking numbers, or just imposing order on a chaotic to-do dump — sorting lines is one of those micro-tasks that interrupts real work a dozen times a week. Editors bury the feature in menus; spreadsheets are overkill for a 30-line list.

This tool sorts lines alphabetically (A→Z or Z→A), numerically, by length, or in random order — one paste, one click. Random order doubles as a fair way to shuffle names for presentations or draws.

How to Use This Tool

  1. Paste your lines into the box.
  2. Pick the sort: alphabetical, reverse, numeric, by length, or shuffle.
  3. Click sort and review the result.
  4. Copy the ordered list back to wherever it came from.

Frequently Asked Questions

Why does alphabetical sort put 'item10' before 'item2'?

Plain alphabetical sorting compares character by character, and '1' precedes '2' regardless of what follows. That is why naming files item01, item02… with zero padding keeps them ordered everywhere. Numeric sort mode handles pure numbers correctly.

How are accented letters sorted?

Using locale-aware comparison, é sorts next to e rather than after z — matching dictionary conventions in most languages. Pure code-point sorting (the old-school behavior) would banish all accented words to the end.

Is the shuffle truly random?

It uses the Fisher–Yates algorithm with the browser's random source, giving every permutation equal probability — the same algorithm used for card shuffling in reputable software. Good enough for fair name draws and randomized orders.

Copied!