Sort Text Lines

Paste a list and reorder it instantly — alphabetically, reverse, by length,numerically or with a random shuffle — and optionally strip duplicate andblank lines, all 100% in your browser.

0Input lines
0Output lines
🔒 100% private — runs in your browser, never uploaded.

How to sort your lines

  1. Paste your list into the Lines to sort box — one item per line.
  2. Pick a Sort order: A–Z, Z–A, by length, numeric, or random shuffle.
  3. Tick any cleanup options — Case-insensitive, Remove duplicate lines or Remove blank lines.
  4. Click Apply, then hit Copy to grab the sorted result.

What each sort order does

Cleaning up while you sort

The three checkboxes run before sorting so your output is exactly what you expect. Remove blank lines strips empty or whitespace-only rows. Remove duplicate lines keeps the first occurrence of each line and drops repeats — and when Case-insensitive is on, Apple and apple count as the same item, so casing never leaves you with sneaky duplicates. The live counters show how many lines went in versus how many came out, so you can see at a glance how much was deduplicated or trimmed.

Is it private?

Yes — every sort and cleanup runs in your browser with plain JavaScript. Your list is never sent to a server, stored, logged or seen by anyone. Once the page has loaded you can even use the tool offline.

Frequently asked questions

Does it upload my text?

No, everything happens locally in your browser and nothing is transmitted.

Why are some lines at the bottom in numeric mode?

Those lines contain no number, so the tool can't rank them numerically and places them after all the numbered lines.

Can I sort a very long list?

Yes. Paste as many lines as you like — the only limit is your browser's available memory.

Related: clean up messy text · change text case · count words & characters