piapia123
en

Line Sorter

Text

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

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

  1. Paste the lines you want to sort
  2. Pick a sort order (natural by default)
  3. Tick dedupe / ignore case / ignore leading whitespace as needed, and choose how blank lines are handled
  4. 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