Line Sorter
TextEverything runs locally in your browser — nothing is uploaded
Sort a list of lines the way you mean. The headline mode is natural sort: it compares runs of digits as numbers, so `file2` comes before `file10` — not the other way round the way a character-wise sort gives. It also does lexicographic, numeric (first number in the line), date (`2026-10-05`, `2026/10/05` and `10/05/2026` are all recognised), length, reverse, and a reproducible shuffle (give a seed and the same order comes back every time). Lines whose number or date cannot be read are pushed to the end rather than silently dropped. Everything runs in your browser; nothing is uploaded and nothing goes over the network.
Features
- Seven orders: natural, lexicographic, numeric, date, length, reverse, random
- Natural sort compares digits as numbers: file2 before file10
- Date sorting accepts three formats; unreadable lines go last, not missing
- Random sort takes a seed so the same order can be reproduced
- Dedupe, ignore case and ignore leading whitespace, all at once
- Blank lines can be kept at the end, dropped, or sorted with the rest
- Copy any single line or the whole result
- Everything runs locally in your browser; nothing is uploaded
How to use
- Paste the lines you want to sort
- Pick a sort order (natural by default)
- Tick dedupe / ignore case / ignore leading whitespace as needed, and choose how blank lines are handled
- The result updates as you type; click Copy to take it
FAQ
- What is the difference between natural and lexicographic?
- Take `file10` and `file2`. Lexicographic compares character by character, `1` before `2`, so `file10` comes first. Natural compares the digit runs as numbers, 10 before 2, so `file2` comes first — which is what file lists, chapter numbers and version numbers want.
- Which date formats are recognised?
- Three: `2026-10-05`, `2026/10/05` (year first), and `10/05/2026` (month/day/year). A four-digit first part is read as the year, so `2026/10/05` is never mistaken for anything else.
- What happens to lines without a date?
- They go to the end, not missing. That way you can see at a glance which lines were not recognised as dates, instead of hunting through a result that quietly lost a few lines. The same applies to numeric sort.
- Does random sort give a different order each time?
- With no seed it reshuffles every run. Give a seed and the same order is reproduced — this tool runs live, so an unseeded shuffle would rearrange on every keystroke and you could never read the result.
Related tools
Line Length Filter
TextFilter lines by length in characters, UTF-8 bytes or display width (CJK counts as two), keeping or dropping the lines inside a range.
Text Cleaner
TextClean up a column pasted out of a log or spreadsheet: deduplicate, sort, drop blank lines, trim whitespace and strip line numbers, all in your browser.
Merge Lines
TextMerge multiple lines into one: turn line breaks into a space, a comma, a semicolon or nothing, with blank lines handled first.
Text Diff
TextCompare two blocks of text online and highlight added, removed and unchanged lines, so only the lines that changed are marked. Runs in your browser.
Word Counter
TextCount Chinese characters and English words separately, alongside characters, lines, real UTF-8 bytes, reading and speaking time, and SMS segment counts.
Case Converter
TextConvert identifiers between fourteen naming styles. Words are split correctly first, so acronyms such as HTTPServer come out right, all in your browser.