Sort Lines

Paste a list and sort it in one click — alphabetically, reversed, or shortest first.

How Sort Lines works

Sort any list of lines alphabetically, reverse, or by length, with optional duplicate removal. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.

That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.

Three orders, one comparison

A→Z and Z→A use locale-aware comparison, which is why accented letters and case sort the way a reader expects rather than by raw character code. Length sorts by character count, shortest first.

Ignore case is on by default, because most lists should sort “apple” and “Apple” together rather than putting all capitals first — which is what happens without it.

Duplicate removal

Removing duplicates keeps the first occurrence and drops later identical lines. It compares the trimmed line exactly, so “apple” and “apple ” with a trailing space are different entries until you also remove trailing whitespace.

The line count in the status tells you how many lines went in and how many came out, which is the quickest way to confirm that duplicates were actually found.

InputA→Z, ignore caseBy length
banana, Apple, cherryApple, banana, cherryApple, banana, cherry
b, aa, cccaa, b, cccb, aa, ccc

What counts as a line

Any line ending works — Windows, Unix or old Mac. Blank lines are lines too, so trailing blank lines collect at the top when sorting Z→A. Strip them first if that is not what you want.

Good to know

  • Works offline once loaded, including on flights and in locked-down networks.
  • No file size limit beyond your device's own memory.
  • Free to use, with no account and no usage counter.
  • Results are produced locally, so they are not logged or shared with anyone.

Questions

Does it ignore case?

Yes by default, so Apple and apple stay together.

Can it remove duplicates while sorting?

Tick the option and only the first occurrence is kept.

Does it sort numbers numerically?

No. It sorts as text, so 10 comes before 9. Pad numbers with leading zeros, or sort in a spreadsheet.

Can I sort a CSV column?

Sorting whole lines keeps the rows intact. If each line is a CSV row, extract the column first.

Keep going

More text tools