PocketPlay
中文

Sort Lines

Sort lines A→Z, Z→A, by number, by length or at random, with Chinese pinyin order, de-duplication and trimming.

🔒 Runs in your browser — files never leave your deviceFree · No sign-up
Order

With pinyin order on, Chinese characters sort the way a dictionary does (安 before 北) instead of by code point.

Your text

Sorted

0Lines in
0Lines out
0Removed
0Characters

How to sort lines of text

  1. Paste your list into the left box — one item per line.
  2. Pick an order (A→Z, numeric, by length, random) and tick the clean-up options you want: ignore case, trim spaces, remove duplicates or empty lines.
  3. Copy the sorted result, download it as a .txt, or press Use result as input to keep working on it.

FAQ

Why does file10 come before file2?

Plain alphabetical sorting compares character by character, so “1” beats “2”. Choose Numeric / natural and the numbers inside each line are compared as numbers, giving file2, file10.

How are Chinese lines sorted?

By default they are ordered by Unicode code point. Tick Chinese pinyin order to sort them the way a Chinese dictionary does, using your browser's built-in zh collation.

Does sorting change my text?

Only the order — and the clean-up options you tick. Nothing is uploaded; the sort happens in this page. The original stays in the left box until you press Use result as input.