Skip to content

Text Tools

Line Sorter

Sort any list of lines alphabetically, numerically, by length, in reverse, or shuffled randomly — with optional deduplication.

Sorting runs locally — no data is uploaded.

Sorting Is Not Just Alphabetical

Plain sort compares code points, which puts every uppercase letter before any lowercase one ("Zebra" before "apple") and digits before letters. Case-insensitive or locale-aware ordering fixes that for human-readable lists. The other trap is numbers: as text, "10" sorts before "9" — numeric mode compares values instead. For mixed lists (SKU codes, file names with version numbers) natural sort, which treats embedded digit runs as numbers, gives the order people expect.

How the Transformation Works

  1. Paste your list into the input area, one entry per line.
  2. Pick a sort mode: A-Z, Z-A, numeric (handles 2 before 10), by line length, reverse, or random shuffle.
  3. Enable case-insensitive ordering or deduplication if you need a cleaner list.
  4. Copy the sorted result or download it as a .txt file.
Formula & Technical Standard
Sorting uses locale-aware string comparison (Array.prototype.sort with Intl collation); numeric mode compares parseFloat values so 2 precedes 10, and the shuffle applies a Fisher–Yates swap.

Example Input & Output

Numeric ordering of quantities
Input: 10\n2\n1
Output: 1\n2\n10
Alphabetical sorting would put "10" before "2". Numeric mode compares values instead of characters.
Reverse a checklist
Input: step1\nstep2\nstep3
Output: step3\nstep2\nstep1
Reverse mode flips the current order without comparing values, useful for newest-first lists.

Common Questions

How does numeric sorting differ from alphabetical?

Alphabetical sorting compares characters one by one, so "10" sorts before "2". Numeric sorting converts each line to a number and compares values.

Can I sort and deduplicate at once?

Yes. Enable the remove duplicates option and duplicates disappear during the same operation.