FlipMyFormat

Sort Text – Alphabetize Any List

Paste any list and get it in order as you type. Alphabetize list items A to Z or Z to A, by last name, with numbers in the right place, by column or at random, using your language's own alphabet. Remove duplicates, number the result and copy it. Nothing is uploaded.

Your list 0 items

Sorted 0 items

Alphabet rules

Items are separated by

Clean up and number

Numbering

Sorted in your browser as you type. Your list is not uploaded.

People also use

How to alphabetize list online in three steps

Paste or type your list in the left box and the sorted version appears on the right straight away. There is no button to press: change any setting and the result updates. Each item goes on its own line by default, but commas, semicolons, tabs, spaces or any other separator work too.

This is the quickest way to alphabetize list online without opening a spreadsheet. Pick A → Z, Z → A, Natural, Numbers, Shortest first, Longest first, By last word, By column, Random or Reverse order under Sort by. Then tidy the result: trim spaces, remove empty lines and duplicates, add numbers or bullets, or group items under their first letters.

Everything happens in your browser, so you can alphabetize list after list without uploading anything. The page works the same on phones, tablets and computers.

  1. 1

    Paste your list

    Type or paste items into Your list, one per line, or press Open TXT or CSV to load a text file. If your items are separated by commas or something else, choose it under Items are separated by.

  2. 2

    Choose how to sort

    Pick a mode under Sort by, such as A → Z, Z → A, By last word or Natural. Set the language under Alphabet rules and tick options such as Ignore accents if you need them.

  3. 3

    Copy or download

    Press Copy, press Download for a sorted.txt file, or press Use as input to sort the result again with other settings. The counts above each box show how many items went in and came out.

Your settings are remembered in this browser for next time. The list itself is never saved.

A to Z, Z to A and reverse alphabetical order: every sort mode

Sort by offers ten ways to order a list. Most people only need A → Z, but the others save a lot of manual work when a list holds numbers, names, file names or table rows.

Z → A gives you reverse alphabetical order: the same comparison as A → Z, turned upside down. Reverse order is something else. It does not compare anything, it simply flips the list so the last line comes first, which is handy for a log or a list that is already in date order.

ModeWhat it doesExample result
A → ZAlphabetical, using the chosen language's rulesapple, Banana, cherry
Z → AAlphabetical, starting from the end of the alphabetcherry, Banana, apple
NaturalNumbers inside text are read as whole numbersfile2, file10, file11
NumbersBy the first number in each item, smallest first; items without a number go last3 kg, 12 kg, 250 kg
Shortest firstBy number of characters; equal lengths in A → Z orderfig, kiwi, mango
Longest firstBy number of characters, longest at the topmango, kiwi, fig
By last wordCompares the last word first, then the words before itGrace Hopper, Ada Lovelace, Alan Turing
By columnSplits each line by a separator and sorts on one columnCSV rows by column 2
RandomShuffles the list; Shuffle again gives a new ordera fresh order each time
Reverse orderFlips the list without sortingthe last line becomes the first

Sort list alphabetically by the rules of your language

Alphabetical order is not the same everywhere. In Swedish, å, ä and ö come after z; in German, ä sorts with a; in Spanish, ñ has its own place after n. A plain computer sort compares character codes, which puts every capital before every small letter and pushes accented letters to the end. That is rarely what you want.

Under Alphabet rules, the first choice is Your browser's language. You can also pick English, German, French, Spanish, Italian, Portuguese, Dutch, Swedish, Danish, Norwegian, Finnish, Polish, Czech, Turkish, Russian, Ukrainian, Greek, Arabic, Hebrew, Hindi, Chinese (pinyin), Chinese (stroke), Japanese, Korean, Thai or Vietnamese. The page then uses the browser's built-in collation for that language to sort list alphabetically the way a dictionary in that language would.

Four checkboxes fine-tune the comparison:

  • Case-sensitive (A before a): capitals and small letters are treated as different, and a capital comes before the same small letter. It is off by default, so apple and Apple sit together.
  • Ignore accents (é = e): accented letters sort as their plain letter, so café and cafe count as equal.
  • Ignore “The”, “A”, “An” at the start: The Beatles sorts under B, the way libraries and record shops file it.
  • Ignore punctuation and symbols: quote marks, brackets, hashes and dashes are skipped, so #zebra sorts with zebra.

Alphabetize list by last name

Lists of people are usually written first name first but sorted by surname. Choose By last word under Sort by and the page compares the last word of each line first, then the words before it. Ada Lovelace, Grace Hopper and Alan Turing become Grace Hopper, Ada Lovelace, Alan Turing.

That is how to alphabetize list by last name in one step, without splitting names into columns. People with the same surname are then ordered by first name, and the language, case and accent settings still apply.

A few names need care. A suffix such as Jr. or III is the last word, so it decides the place. Surnames with a particle, such as van Gogh or de la Cruz, are sorted by the final word. If your list is already written as Surname, First name, use A → Z instead, because the surname comes first. For an export where first and last names sit in separate columns, use By column and pick the surname column.

Alphabetize list of names, titles and mixed items

Names are the most common thing people sort, and they arrive in messy forms: extra spaces, blank lines from a copy-paste, the same person twice, a mix of capitals and small letters. To alphabetize list of names from a sign-up sheet or a class register, keep Trim spaces and Remove empty lines ticked, add Remove duplicates, and leave Case-sensitive off.

Book, film and band titles are different. Tick Ignore “The”, “A”, “An” at the start so The Hobbit files under H and A Tale of Two Cities under T. The full title is kept in the result; only the comparison skips the word. Ignore punctuation and symbols works the same way and helps with titles that start with a quote mark or a number sign.

To alphabetize list entries that mix letters and digits, such as product codes, use Natural, so ITEM-9 comes before ITEM-10.

Sort words alphabetically in a sentence or a comma list

Not every list comes one item per line. Tags, keywords and ingredients are often written as a comma list, and sometimes you want to sort words alphabetically inside a single sentence. Under Items are separated by, choose New lines, Commas, Semicolons, Tabs, Spaces or Other, and type your own separator for Other, such as a pipe |.

With Spaces, every run of spaces or line breaks splits items, so a paragraph becomes a list of words. Punctuation stays attached to its word, so tick Ignore punctuation and symbols to keep a word followed by a comma in its proper place.

Output joined by decides how the result is written: the same separator as the input, or new lines, commas, semicolons, tabs or spaces. Commas and semicolons get a space after them. That makes it easy to turn a column of words into one comma-separated line, or a comma list into one item per line.

Sort text lines by number, length, column or at random

Some lists are not about letters at all. To sort text lines that start with or contain numbers, choose between two modes. Natural keeps normal text order but reads digits as whole numbers, so Chapter 2 comes before Chapter 10. Numbers looks only at the first number in each line, including decimals and minus signs, ignores thousands commas, and puts lines without a number at the end.

Shortest first and Longest first order items by their number of characters. That helps you find the shortest usernames or the longest product titles, or solve word puzzles. Items of the same length are put in A → Z order.

By column treats each line as a row. Enter the column number and the separator, for example column 2 and a comma for a CSV file. Numbers in that column sort naturally, so prices and IDs come out in the right order, and the whole line moves, not just the cell. Data copied from a spreadsheet is separated by tabs: paste a tab character into the separator box, or save the sheet as CSV and load it with Open TXT or CSV.

Random shuffles the list, which is handy for drawing names, setting a quiz order or picking teams. Press Shuffle again for a new order.

Alphabetize list a to z with numbering and letter groups

Once you alphabetize list items in the right order, the Clean up and number card turns the result into something you can paste straight into a document. Under Numbering, choose None, 1., 1), • or - to put a number or a bullet in front of every line. Numbering always follows the final order.

Group under first letters (A, B, C…) appears when you alphabetize list a to z, Z to A or with Natural. It writes each starting letter on its own line, followed by the items that begin with it, with a blank line between groups, like an index or a glossary. Accented first letters join their plain letter, items that start with a digit go under 0–9, and the article and punctuation settings decide which letter counts as first. With groups on, numbering starts again in each group.

Remove duplicates keeps the first copy of each item and drops the rest, and the count above the result shows how many were removed. With ignore case ticked, Apple and apple count as the same item. Spaces at the ends are ignored when comparing.

Sort alphabetically online or in Word, Excel and Google Sheets

Word processors and spreadsheets can sort too, and if your list already lives there, that may be quickest. In Word, select the lines and use the Sort button on the Home tab, choosing Text and Ascending or Descending. In Excel, select the column and use Sort A to Z or Sort Z to A on the Data tab. In Google Sheets, select the range and use Data, then Sort range, or a formula such as =SORT(A2:A100).

Those programs sort cells and paragraphs. They are less handy for a comma list, a list in a chat message, names that need sorting by the last word, or a quick list on a phone. To sort alphabetically online here, you paste, read the result and copy it, with duplicates, numbering and language rules handled in the same place.

What people sort with it

Class and team lists

Put pupils, players or staff in order by first or last name for registers, rotas and seating plans.

Reference lists

Alphabetize list entries in a bibliography with A → Z when each one starts with the author's surname.

Glossaries and indexes

Alphabetize list terms for a glossary and turn on Group under first letters to get A, B, C headings.

Keywords and tags

Sort a comma list, drop repeated tags and join it back with commas.

Shopping and packing lists

Remove repeats, put items in order and add bullets before printing.

File names and chapters

Natural puts photo2 before photo10 and Chapter 9 before Chapter 10.

Random draws

Shuffle names for a raffle, a presentation order or a quiz.

CSV rows

Sort rows by any column, such as price, ID or a date written year-month-day.

Troubleshooting: when the order looks wrong

Capital letters come out first

Case-sensitive is ticked. Untick it so apple, Apple and APPLE sort together.

Accented words land in the wrong place

Choose your language under Alphabet rules, or tick Ignore accents (é = e) to treat them as plain letters.

The whole list stays on one line

Your items are separated by something other than new lines. Choose Commas, Semicolons, Tabs, Spaces or Other under Items are separated by.

10 comes before 2

A → Z compares text character by character. Choose Natural or Numbers to read numbers as whole values.

Decimal commas sort wrongly in Numbers

Numbers removes commas as thousands separators, so 3,5 is read as 35. Write decimals with a point, or use Natural.

By last word picks Jr. or a title

The mode always uses the final word. Remove suffixes first, or write names as Surname, First name and use A → Z.

Duplicates are not removed

Tick Remove duplicates. Items that differ only in letter case are merged when ignore case is ticked; items that differ in punctuation or inner spaces are kept.

The letter groups option is missing

Group under first letters only shows for A → Z, Z → A and Natural, because the other modes do not order by letter.

All settings at a glance

SettingChoicesWhat it does
Sort byA → Z, Z → A, Natural, Numbers, Shortest first, Longest first, By last word, By column, Random, Reverse orderThe order of the result
Column and separatorA number and any characterFor By column: which column to sort on and what splits it
Alphabet rulesYour browser's language or one of 26 languagesWhich alphabet and letter order to follow
Case and accentsCase-sensitive, Ignore accentsWhether A and a, or é and e, count as different
Ignore at the start“The”, “A”, “An”; punctuation and symbolsSkipped when comparing, kept in the result
Items are separated byNew lines, Commas, Semicolons, Tabs, Spaces, OtherHow your input is split into items
Output joined byThe same, new lines, commas, semicolons, tabs, spacesHow the result is written
Clean upTrim spaces, Remove empty lines, Remove duplicates (ignore case)Tidies items before sorting
NumberingNone, 1., 1), •, -A number or bullet in front of each line
Group under first lettersOn or offLetter headings for A → Z, Z → A and Natural

Alphabetize list free and private, right in your browser

There is no account, no sign-up and no limit on how often you use it. You can alphabetize list free of charge as often as you like, from a handful of names to many thousands of lines; very long lists just take a moment longer on slower devices.

The sorting runs in this page with your browser's own language rules. Your list is not uploaded, logged or put in the address bar. Only your choices, such as the sort mode, separator and checkboxes, are remembered in this browser's local storage, so the page opens the way you left it. The text you paste is never stored, and files opened with Open TXT or CSV are read on your device.

What to do next

Need the list in capitals, title case or lower case before you sort it? The Case Converter changes that in one step. The Word Counter tells you how many words and characters your list holds, and the Diff Checker shows what changed between the original and the sorted version, line by line.

Working with data files? CSV to JSON and JSON to CSV convert between the two formats, and CSV to PDF turns a sorted table into a document you can print or share.

Frequently asked questions

How do I alphabetize list online?

Paste or type your items in Your list, one per line, and keep Sort by on A → Z. The sorted list appears on the right as you type. Press Copy or Download to take it with you.

How do I alphabetize list by last name?

Choose By last word under Sort by. Each name is compared by its last word first, then by the words before it, so people with the same surname are ordered by first name. If names are already written surname first, use A → Z.

How should I alphabetize list of names copied from a spreadsheet or chat?

Keep Trim spaces and Remove empty lines ticked, tick Remove duplicates with ignore case, and pick A → Z or By last word. Set your language under Alphabet rules so accented names land in the right place.

How do I alphabetize list a to z and add numbers?

Pick A → Z, then choose 1., 1), • or - under Numbering. Each line gets its number or bullet in the final order. With Group under first letters turned on, numbering starts again in each letter group.

Can I alphabetize list free without signing up?

Yes. The tool is free, needs no account and has no daily limit. It runs in your browser, so your list is not uploaded.

Can I sort alphabetically online on my phone?

Yes. The page works in mobile browsers. Paste your list, choose a mode and press Copy; on small screens the two boxes stack above each other.

How do I sort text lines that contain numbers?

Choose Natural to read numbers inside text as whole numbers, so line 2 comes before line 10. Choose Numbers to sort only by the first number in each line, smallest first, with lines that have no number at the end.

How do I sort list alphabetically in another language?

Pick the language under Alphabet rules, for example Swedish, German, Spanish or Polish. The page then follows that language's alphabet, so letters such as å, ö or ñ go where a dictionary in that language puts them.

Can I sort words alphabetically in a sentence?

Yes. Choose Spaces under Items are separated by, paste the sentence and pick A → Z. Tick Ignore punctuation and symbols so words next to a comma or full stop still sort correctly, and choose how the result is joined under Output joined by.

How do I put a list in reverse alphabetical order?

Choose Z → A under Sort by. It uses the same comparison as A → Z, from Z back to A. Reverse order is different: it simply flips the list as it is, without sorting.

Why do capital letters sort first?

That happens when Case-sensitive (A before a) is ticked. With it off, which is the default, capitals and small letters sort together.

Can I ignore “The” at the start of titles?

Yes. Tick Ignore “The”, “A”, “An” at the start. The Hobbit then sorts under H, but the result still shows the full title.

How do I sort a comma-separated list?

Choose Commas under Items are separated by. The result is joined with commas again, or pick new lines under Output joined by to get one item per line.

How do I remove duplicates while sorting?

Tick Remove duplicates in the Clean up and number card. The first copy of each item is kept, and the count above the result shows how many were removed. With ignore case ticked, Apple and apple count as the same.

Can I sort a CSV file by one column?

Yes. Press Open TXT or CSV or paste the rows, choose By column, and enter the column number and the separator, such as a comma. Whole rows move together, and numbers in that column sort naturally.

Why does 10 come before 2?

A → Z compares text character by character, and the character 1 comes before 2. Choose Natural or Numbers to sort numbers by their value.

How do I shuffle a list randomly?

Choose Random under Sort by. The list is shuffled, and Shuffle again gives a new order each time you press it.

Can I group the list under letters A, B, C?

Yes. With A → Z, Z → A or Natural selected, tick Group under first letters (A, B, C…). Each letter gets a heading line followed by its items, and items starting with a digit go under 0–9.

How do I sort a list in Word, Excel or Google Sheets?

In Word, select the lines and use Sort on the Home tab. In Excel, use Sort A to Z on the Data tab. In Google Sheets, use Data, then Sort range, or the SORT function. A comma list, sorting by last name or a quick job on a phone is often easier here.

Is there a limit on list size?

There is no upload, so there is no upload limit. Lists of many thousands of lines sort in your browser; very large lists may take a moment on slower devices.

Is my list sent anywhere?

No. Sorting happens in your browser and your list is not uploaded or saved. Only your settings, such as the sort mode and separator, are remembered in this browser.

Sort your list now

A to Z, Z to A, by surname, by number or by column. Free, private and sorted on your device.

Back to the tool

Last updated October 2026 · Written and maintained by the FlipMyFormat team