Skip to main content
ToolsBay

Runs in your browser — nothing is uploaded · verify

Sort Lines Alphabetically — free, and it runs in your browser

Sort a list of lines A–Z, Z–A, or by length.

  • Ten lines or a hundred thousand, with no size limit and no pagination.
  • Natural ordering, so item 2 comes before item 10 rather than after it.
  • Blank lines and stray whitespace are handled predictably instead of scattering.

Your list

Tab indents · Esc then Tab to leave1 line

Sorted result

1 line
  • 70 tools

    Free, with no account and no watermark

  • 0 bytes

    Of your files or text uploaded — this tool runs in the tab

  • No queue

    The work happens in this tab, not in a line behind other users

Three steps, nothing to install

Sort Lines Alphabetically in three steps

  1. LIST123456Paste it in — it never leaves the tab

    Paste your lines

    Any list, one entry per line. Nothing is sent anywhere.

  2. LISTLISTConverted on your own device

    Choose the order

    Alphabetical in either direction, or by length when you are looking for the outliers.

  3. Copy LIST

    Copy the sorted list

    Straight to the clipboard, ready to paste back where it came from.

Why use Sort Lines Alphabetically

  • Natural, human ordering

    Numbers inside strings sort by value, so "item 2" precedes "item 10". Plain string comparison puts them the other way round, which reads as broken.

  • Handles real-world sizes

    Large documents are processed in one pass without pagination or a cut-off, so you are not left wondering which half of the input arrived.

  • Your text stays in the page

    What you paste is not transmitted or stored, so an API response full of customer records, a token or an internal query never leaves your machine.

Frequently asked questions

Because this sorts the way a person would, not the way a computer stores letters. JavaScript's default sort compares character codes, and every capital letter has a lower code than every lowercase letter — so it puts Zebra before apple. This tool uses locale-aware comparison instead.

Sorting a list the way people expect

Alphabetical sorting looks trivial and is not. The default sort in most programming languages compares UTF-16 code units, which means every capitalised entry lands before every lowercase one: ["banana", "Apple"] sorts to ["Apple", "banana"] for the wrong reason, and ["apple", "Banana"] sorts to ["Banana", "apple"] which is plainly wrong.

This tool compares using locale rules, so case is ignored for ordering purposes and accented letters sort next to their base letter rather than after Z. Digits inside text are compared numerically, so item2 precedes item10.

The other sort modes

Sorting by length is useful for finding outliers — the one malformed row in a column of IDs is usually the longest or shortest. Reverse order does not sort at all; it simply flips the list you already have, which is what you want when the input was already in a meaningful order.

Pair this with remove duplicate lines to get a clean, ordered, unique list.

More tools

70 tools, none of which want your file

Everything this tool does happens in the page you are looking at. No account, no upload, no watermark.