Close Menu
Vents MagazineVents Magazine

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Funny Birthday Wishes That Won’t Backfire

    What Is a Self-Hosted Learning Management System? Benefits, Drawbacks, and When It Makes Sense

    Donna Sicuranza: Complete Biography and TEAM Career

    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Vents MagazineVents Magazine
    Subscribe
    • News
    • Tools
      • Financial
      • Health
      • Math
      • Everyday
      • Engineering
      • Text & Fonts
    • Tech
      • AI & Tools
      • Software
    • Science
    • Business
      • Entrepreneurship
    • Health
    • Lifestyle
    • Travel
    • Home & Living
    • Blog
    • About Us
    • Contact Us
    • Privacy Policy
    Vents MagazineVents Magazine
    You are at:Home»Free Online Calculators and Tools»Sort Lines Alphabetically

    Sort Lines Alphabetically

    All tools › Text, Fonts & Symbols › Text Utilities

    Paste a list and sort its lines A to Z, Z to A, by length, by number or in natural order.

    Put a list in order, one line per item

    Paste a list and this tool sorts its lines alphabetically from A to Z or Z to A. It can also sort by line length, by the number at the start of each line, or in natural order so that “file2” comes before “file10”. Reverse and shuffle are included.

    It is useful for name lists, reading lists, glossary terms, file names, keyword lists and anything else kept as one item per line. The sorting is done in your browser, and the list is not uploaded.

    How to sort lines

    1. Paste the list into Your lines.
    2. Choose the Sort order.
    3. Under Capital letters, ignore them (the usual choice for words) or let capital letters come before small letters.
    4. Decide what to do with Spaces at the start and end of a line, Empty lines and Duplicate lines.
    5. For Shuffle only, you may type a Seed to get the same random order again.
    6. Press Copy next to the sorted text.

    What each sort order does

    A to Z: compare two lines character by character; the first different character decides

    Characters are compared by their code numbers. In that order a space comes first, then digits 0 to 9, then capital letters A to Z, then small letters a to z, then accented letters. When capital letters are ignored, every line is compared in lowercase but shown as you typed it. Lines that compare equal stay in their original order.

    Sort orderRule
    A to Z / Z to ACharacter by character, as described above, or the opposite.
    Shortest / longest line firstBy number of characters. Lines of equal length are placed A to Z.
    By leading numberReads a number at the start of the line: an optional + or − sign, digits and an optional decimal point. Lines with no leading number go last, in their original order.
    Natural orderEach line is cut into runs of digits and runs of other characters. Digit runs are compared as whole numbers, so 2 comes before 10. A digit run sorts before text.
    Reverse the current orderLast line first. Nothing is compared.
    ShuffleA random order. Every line keeps its text.

    Trimming, removing empty lines and removing duplicates all happen before sorting. Duplicates are found with the same capital-letter setting as the sort, and the first copy is the one kept.

    Worked example

    Paste seven lines: Chapter 10, chapter 2, Appendix, Chapter 1, an empty line, zebra notes, Chapter 2. With every option as it loads (A to Z, capital letters ignored), the result is “6 lines sorted”:

    Appendix, Chapter 1, Chapter 10, chapter 2, Chapter 2, zebra notes.

    Chapter 10 lands before chapter 2 because the character “1” comes before “2”. Now choose Natural order and set Duplicate lines to Remove them:

    RowValue
    Sorted lines5 lines sorted
    Sorted textAppendix, Chapter 1, chapter 2, Chapter 10, zebra notes (one per line)
    Lines in7
    Lines out5
    Empty lines removed1
    Duplicate lines removed1
    First lineAppendix
    Last linezebra notes

    “Chapter 2” was dropped as a duplicate of “chapter 2”, which came first.

    Choosing the right order

    Use A to Z for words and names. Use natural order for anything with numbers inside the text: file names, chapter titles, street addresses, version labels. Use the leading-number order for lines that start with a quantity, a score or a price without a currency sign, especially when decimals or negative numbers are involved, since natural order reads digits only as whole numbers.

    Limits

    • This is not dictionary order for every language. Accented letters sort after z, so “éclair” comes after “zebra”. Sorting rules that depend on a language are not applied.
    • Names are sorted by the start of the line. To sort people by last name, the last name has to come first on each line.
    • The leading-number order does not read thousands separators, currency signs or dates. “1,200” is read as 1.
    • Shuffle without a seed uses your browser’s random function. It is fine for games and class lists, not for security.
    • The text can be up to 100,000 characters.

    Frequently asked questions

    Why does 10 come before 9 in A to Z order?

    A to Z compares characters, and “1” comes before “9”. Choose natural order or the leading-number order to sort by value.

    How do I sort in reverse alphabetical order?

    Choose Z to A. “Reverse the current order” is different: it flips the list as pasted without sorting it.

    Do lines starting with a capital letter sort first?

    Only if you choose “Capital letters before small letters”. With capitals ignored, “apple” and “Apple” sort together.

    Will sorting change the text of my lines?

    No, apart from trimming spaces at the ends if that option is on. Lines are only moved, and removed if you ask for empty or duplicate lines to go.

    Related calculators

    • Remove Duplicate Lines – more control over which repeated line is kept.
    • Find and Replace Text – change a word or separator in every line.
    • Random Team Generator – split a list of names into random teams.
    • Character Counter – check the length of a line or the whole list.
    Top Posts

    Henry Golding Ethnicity: Complete Heritage Guide

    October 15, 202679 Views

    Why Petrol Prices Keep Rising in USA: Expert Guide

    May 17, 202673 Views

    5 Proven Side Hustles With Just a Phone in 2026

    May 16, 202673 Views

    ChatGPT vs Claude vs Gemini: Expert 2026 Guide

    May 30, 202655 Views
    Don't Miss
    Lifestyle November 3, 2026

    Funny Birthday Wishes That Won’t Backfire

    A good joke in a birthday message makes someone’s day. A bad one can sting…

    What Is a Self-Hosted Learning Management System? Benefits, Drawbacks, and When It Makes Sense

    Donna Sicuranza: Complete Biography and TEAM Career

    Henry Golding Ethnicity: Complete Heritage Guide

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Demo
    Our Picks

    Funny Birthday Wishes That Won’t Backfire

    What Is a Self-Hosted Learning Management System? Benefits, Drawbacks, and When It Makes Sense

    Donna Sicuranza: Complete Biography and TEAM Career

    Most Popular

    How Do Fireflies Glow? The Complete Science Explained

    May 15, 20260 Views

    5 Best Free AI Background Remover Tools in 2026 (Tested on 30 Real Images)

    May 16, 20260 Views

    Why You Feel Tired After Eating Rice: The Real Science and What to Do

    May 16, 20260 Views
    © 2026 Vents Magazine. All Rights Reserved.
    • Home
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Write for Us
    • DMCA Policy
    • Terms and Conditions
    • Tools

    Type above and press Enter to search. Press Esc to cancel.