Remove Duplicates Remove repeated lines instantly Text Cleaner Remove formatting & clean text Word Frequency Find top words by frequency
Sort Mode
Options
0 lines
0 lines
How It Works
  1. 1Paste your list — one item per line — into the Input box.
  2. 2Pick a sort mode: A→Z, Z→A, Shortest, Longest, or Random.
  3. 3Toggle options: case-insensitive, trim spaces, remove duplicates.
  4. 4Click "Copy result" and paste your sorted list anywhere.

What is a Sort Lines Tool?

A sort lines tool — sometimes called an online list sorter or alphabetize tool — takes a block of plain text, splits it into individual lines, and rearranges those lines according to a rule you choose: A to Z, Z to A, shortest to longest, longest to shortest, or a random shuffle. The result is an instantly organized list you can copy and use anywhere.

The need to alphabetize a list or arrange items in a specific order comes up constantly across many fields. Students assemble bibliography entries that must be in alphabetical order. Developers maintain navigation arrays and configuration files where sorted order makes diffs easier to review. SEO professionals organize keyword lists before analysis. Writers compile glossaries. The task is repetitive and tedious when done by hand — especially for lists with hundreds of items.

This online alphabetizer handles all of that in one click, directly in your browser. Your text never leaves your browser — everything is processed locally, so your data remains completely private. No account, no upload, no waiting. Paste, sort, copy — done.

How to Alphabetize a List Online — Step by Step

  1. Paste your list. Copy your items — one per line — and paste them into the Input box. The result updates instantly; no need to click a button.
  2. Choose a sort mode. Select one of the five sorting modes above the text boxes: A → Z (alphabetical), Z → A (reverse alphabetical), Shortest first, Longest first, or Random shuffle. The output updates immediately when you switch modes.
  3. Set your options. Toggle "Case-insensitive" if you want uppercase and lowercase letters treated equally. Enable "Trim whitespace" to ignore leading/trailing spaces. Check "Remove duplicates" to deduplicate and sort in one step.
  4. Copy and paste. Click "Copy result" to copy the sorted list to your clipboard. Paste it wherever you need it — a document, a spreadsheet, a code file, or a CMS.

Sort Modes Explained — Examples

Input list Sort mode Output
Tokyo
Berlin
Madrid
Oslo
Cairo
A → Z (alphabetical) Berlin
Cairo
Madrid
Oslo
Tokyo
Tokyo
Berlin
Madrid
Oslo
Cairo
Z → A (reverse alphabetical) Tokyo
Oslo
Madrid
Cairo
Berlin
Tokyo
Berlin
Madrid
Oslo
Cairo
Shortest first (by character count) Oslo
Cairo
Tokyo
Berlin
Madrid
Tokyo
Berlin
Madrid
Oslo
Cairo
Longest first (by character count) Berlin
Madrid
Tokyo
Cairo
Oslo
Tokyo
Berlin
Madrid
Oslo
Cairo
Random shuffle Cairo
Tokyo
Oslo
Madrid
Berlin
(order varies each run)

Use Cases

Related Tools

Frequently Asked Questions

How do I alphabetize a list online?

Paste your list into the Input box above — one item per line — and select the "A → Z" sort mode. The alphabetized result appears instantly on the right. Click "Copy result" to copy it to your clipboard.

What does "alphabetize" mean?

To alphabetize a list means to arrange its items in alphabetical order from A to Z, following the sequence of the English alphabet. It is the standard ordering used in dictionaries, indexes, bibliographies, and most reference documents.

Can I sort a list of numbers with this tool?

The tool sorts text lexicographically (dictionary order), which means numbers are sorted as text strings rather than numeric values. In lexicographic order, "10" comes before "9" because "1" comes before "9". For true numeric sorting, use a spreadsheet application like Google Sheets or Excel.

How does sorting by line length work?

"Shortest first" ranks lines from fewest characters to most, and "Longest first" does the reverse. Lines of equal length maintain their original relative order. This mode is useful for detecting outliers in a dataset, formatting tables, or processing text in order of complexity.

What is the difference between the standard A-Z sort and case-insensitive sort?

The default A–Z sort is case-sensitive, which means uppercase letters sort before their lowercase equivalents. "Berlin" would appear before "amsterdam" because "B" has a lower Unicode code point than "a". Enabling "Case-insensitive" normalizes all characters to lowercase before comparing, giving a pure alphabetical result regardless of capitalization.

Is the random shuffle truly random?

The shuffle uses the Fisher-Yates algorithm driven by JavaScript's Math.random(), a pseudo-random number generator seeded by your browser's entropy. The result is random enough for everyday purposes — surveys, raffle draws, or randomizing presentation order — but it is not cryptographically secure and should not be used for security-sensitive applications.

Is my data safe? Does the tool store my text?

Your text never leaves your browser — everything is processed locally using JavaScript on your device. Nothing is sent to a server, stored, or logged. The tool works entirely offline once the page has loaded.

From the Blog

See all guides →