Line Sorter
Four sort modes and five cleanup switches — drop blanks, dedupe, trim, ignore case, reverse — all done in the browser.
How to Use
- Paste your text
Paste multi-line text on the left, one item per line, and the right pane fills immediately; you can also edit the result and use Move result into input to keep processing.
- Pick a mode
Dictionary for characters, length for keywords, first number for numbered lines, natural for filenames and versions — if unsure, run each once and compare.
- Toggle the cleanups
Keep drop blanks and trim on by default; dedupe as needed; ignore case affects both dedupe and sorting; reverse flips the whole ascending result.
FAQ
Natural order versus dictionary order?
It comes down to digit runs. Dictionary order compares character by character: the second character of 'a10' is '1', of 'a2' is '2', and '1' < '2', so a10 sorts before a2. Natural order treats a run of digits as a number, 10 > 2, so a2 comes first. Filenames, version numbers and chapter numbering all need natural order.
Which duplicate survives?
The first occurrence, which also keeps its original position. With Ignore case on, Apple and apple count as duplicates; the earlier original text is kept and no rewriting happens.
Why do some lines jump to the end under sort by first number?
Because they contain no number. Without a value they cannot take part in numeric comparison, so they go to the end and the note tells you how many. At least the order stays stable instead of shuffling with input order.
Is it safe for sensitive data?
Yes. The sorting runs entirely in this page's JavaScript with no network requests, so nothing leaves your browser. You can verify by disconnecting and using it — it works exactly the same.