Don's Tools · Text & Writing · Sort Lines

Sort lines

Put your lines in order: alphabetical, numeric, by length or shuffled, right in your browser. Nothing is uploaded.

Order
Private by design: your text is sorted in your browser and is never uploaded. Numeric order reads the first number on each line; Length sorts shortest to longest.
Sort Lines is a free tool that orders lines of text entirely in your browser, with nothing uploaded. Sort alphabetically A to Z or Z to A, by line length, numerically by the first number on each line, reverse the order, or shuffle randomly, with options to ignore case, trim spaces, remove duplicates and drop blank lines, then copy or download the result.

Frequently asked questions

Is my text uploaded anywhere?

No. Sorting happens entirely in your browser and your text is never sent to a server.

What sort orders are available?

Alphabetical A to Z and Z to A, by line length, numeric by the first number on each line, simple reverse of the current order, and random shuffle.

How does numeric sorting work?

It reads the first number it finds on each line and sorts by that value, so lines like item 2 and item 10 end up in the right order. Lines with no number are placed at the end.

Can it remove duplicates and blank lines too?

Yes. Turn on Remove duplicates to keep only the first copy of each line, and Remove blank lines to drop empty lines before sorting.

Does Ignore case change my text?

No. It only affects the comparison while sorting; your lines keep their original capitalization in the result.

Is there a size limit?

No fixed limit, though very large lists are handled in your browser and may be slower on an older device.