Utility Hub

Sort Lines

Sort any block of text line by line — alphabetically, numerically, or by length. Numeric sorting uses real number values, not string order.

Sort order

Processed locally in your browser.

100% Client-Side Processing
How your privacy is protected

What does this tool do?

The Sort Lines tool takes a block of text and reorders the lines according to the sort mode you choose. It is useful for sorting lists, cleaning up code, organising data, and more.

Sort modes

Numeric sorting example

Input: 10 / 2 / 30 / 4

Numeric ascending → 2 / 4 / 10 / 30 (not 10 / 2 / 30 / 4 as alphabetical would give).

Options

How to use

Privacy

Your text is processed entirely in the browser. Nothing is transmitted to any server.

Frequently Asked Questions

What happens to empty lines during sorting?

By default, empty lines are preserved but moved to the bottom of the sorted list. Check 'Remove empty lines' if you prefer to exclude them entirely.

How does numeric sorting differ from alphabetical sorting?

Alphabetical sorting checks character-by-character ('10' comes before '2'). Numeric sorting parses the true numerical value of each line so that 2 comes before 10.

Can I sort lines by character length?

Yes. Select 'Short → Long' to sort from shortest to longest line, or 'Long → Short' for reverse length ordering.

Is my text sent to a server?

No. All line sorting algorithms execute locally in your browser using client-side JavaScript. No data is sent across the network.