Text Sorter

Sort lines alphabetically, numerically, by length, reverse, or shuffle — with dedupe and trim. Fast and fully private in your browser.

Runs in your browser — nothing uploaded
Input0 lines
Sort order
Sorted result0 lines

Use this free text sorter to alphabetize a list, order numbers, sort by line length, reverse the order, or shuffle lines at random. Built-in options let you trim whitespace, remove blank lines, and drop duplicates in the same pass — so a messy pasted list becomes clean, ordered output instantly.

Private by design — your data never leaves your device

How to use it

No account, no upload — it all happens on your device.

1
Paste your list into the input box — one item per line.
2
Pick a sort order: alphabetical, numeric, by length, reverse, or shuffle.
3
Optionally trim lines, drop blanks, remove duplicates, or make it case sensitive.
4
Copy the sorted result from the bottom box.

What you can do with a text sorter

Everyday list-wrangling that is tedious by hand.

  • Alphabetize anything. Names, tags, imports, CSV columns, or a grocery list — get them in A→Z or Z→A order in one click.
  • Sort numbers correctly. Plain text sorting puts “10” before “2”. Numeric mode reads the value on each line and orders it the way you expect.
  • Deduplicate a list. Combine sort with Remove duplicates to collapse a list down to its unique entries.
  • Randomize fairly. Shuffle mode reorders lines for draws, sampling, or randomized test data.

Worked examples

The same five lines under different sort orders.

ModeInputOutput
A → Zbanana, Apple, cherryApple, banana, cherry
Numeric 0 → 910 apples, 2 oranges, 1 pear1 pear, 2 oranges, 10 apples
Longest firstfig, apple, kiwiapple, kiwi, fig

Alphabetical vs. numeric: why order can surprise you

Understanding text order prevents the classic “10 before 2” bug.

Computers sort text character by character. Under plain alphabetical order, "10" sorts before "2" because the character "1" comes before "2" — the same reason file names like img10.png appear before img2.png in some lists. Numeric mode fixes this by comparing the actual number on each line. When a line has no number, it is pushed to the end so your numbered items stay together. Case sensitivity works the same way: with it off, “apple” and “Apple” are treated as equal, which is usually what you want for human-readable lists.

Frequently asked

Is my list sent to a server?
No. Sorting happens entirely in your browser. Your list is never uploaded and never leaves your device, so it is safe to sort private or sensitive data.
How does numeric sorting handle mixed text?
Numeric mode reads the first number it finds on each line and orders by that value, so “10 apples” comes after “2 oranges”. Lines with no number fall to the end.
Why did some lines disappear after sorting?
By default the tool removes blank lines and trims whitespace, and the Remove duplicates option drops repeated entries. Turn those options off if you want to keep every line exactly as typed.

Related tools

Word CounterCount words, characters, sentences, and paragraphs in your text. Estimates reading and speaking time. Runs entirely in your browser.Lorem Ipsum GeneratorGenerate Lorem Ipsum placeholder text — paragraphs, sentences, or words. Classic Latin or playful hipster filler. Copy-ready.Diff CheckerCompare two blocks of text side-by-side and highlight added, removed, and changed lines. Runs entirely in your browser.