Skip to content

Sort Lines

Sort a list alphabetically, numerically, by length or at random.

0 lines in, 0 lines out.

Quick Tool Overview

Sort Lines puts a pasted list into order: A to Z, Z to A, by the number inside each line, by length, reversed or shuffled at random. Natural ordering is on by default, so item 2 comes before item 10 rather than after it.

What it does
Sorts a list of lines and cleans it up at the same time
You give it
A list with one item per line
You get back
The sorted list, optionally numbered or bulleted
Best for
Version lists, file names, chapter lists, names and references
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Sort Lines

Sorting a list is trivial in a spreadsheet and irritating everywhere else. Paste the lines here and pick an order: A to Z, Z to A, by the number inside each line, by line length, reversed, or shuffled at random.

Natural order is on by default, so item 2 comes before item 10 rather than after it. A plain alphabetical sort compares text one character at a time and puts 10 first, which is almost never what anyone wants from a list of versions, chapters or file names.

While the list is open you can also trim the spaces around each line, drop the blank ones, remove duplicates, and number the output or turn it into a bulleted list ready to paste into a document.

Key features of the Sort Lines

Natural ordering

Numbers inside text sort as numbers, so item 2 comes before item 10 instead of a plain alphabetical sort putting 10 first.

Six sort orders

Alphabetical both ways, numeric, by line length, reversed and random shuffle.

Clean while you sort

Trim surrounding spaces, drop blank lines and remove duplicates in the same pass.

Numbered and bulleted output

Turn the sorted list into a numbered or bulleted list ready to paste into a document.

Any list length

A dozen lines or several thousand sort just as quickly, entirely in your browser.

How to use the Sort Lines

  1. 1

    Paste your list

    One item per line, straight out of a spreadsheet, an export or a document.

  2. 2

    Choose an order

    Alphabetical, numeric, by length, reversed or shuffled. The result updates immediately.

  3. 3

    Clean it up at the same time

    Trim stray spaces, drop blank lines and remove duplicates without a second pass.

  4. 4

    Number it and copy

    Add numbering or bullets if you need them, then copy or download the sorted list.

Frequently asked questions

It is sorting that reads runs of digits as numbers rather than as characters, so file2 comes before file10. A plain alphabetical sort compares the 1 in 10 against the 2 in file2 and gets the order backwards. It is on by default here.

Reviews of the Sort Lines

What people who use the Sort Lines think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Sort Lines. It takes half a minute and no account.

Write the first review

More text tools