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
Good to know: 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.

Files are processed in your browser and never uploaded.

How to use Sort lines

  1. Add your text

    Type or paste your text into the input box. Everything is handled by your own browser, so nothing is sent to a server.

  2. Set the options

    Choose Ignore case, Trim each line, Remove duplicates and Remove blank lines. The options are visible from the start, not hidden until you paste something.

  3. Read it and keep a copy

    The output updates as you type, so there is nothing to submit and nothing to wait for. Copy result, Don puts the result on your clipboard and Download .txt saves it as a file.

What this tool does

Sort A to Z or Z to A

A to Z and Z to A sort alphabetically, which is what most lists need and what a spreadsheet makes surprisingly fiddly.

Sort by length or numerically

Length orders by how long each line is, and Numeric sorts by value so 2 comes before 10 rather than after it.

Reverse or shuffle lines

Reverse flips the list as it stands, and Shuffle puts it in a random order, for draws and running orders.

Ignore case, trim, dedupe, drop blanks

Ignore case, trim each line, remove duplicates and drop blanks can each be turned on, so one pass cleans and sorts together.

No upload, no sign-up

The list is sorted in your browser, so nothing is uploaded, and Copy result or Download .txt takes it away.

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.

Last updated: