Sort lines of text online for free
Sort Lines puts a list in order in one click. Paste your lines, choose A to Z, Z to A, numbers from low to high, or shortest to longest, and the sorted list appears below ready to copy. You can ignore capital letters, trim stray spaces, drop empty lines and remove repeated lines at the same time, which cleans a list as it sorts it.
How to sort a list alphabetically
- Paste your list into the box, with one item on each line.
- Pick a sort order from the list.
- Tick or untick the options: ignore case, trim spaces, remove empty lines and remove duplicates.
- Press Sort lines.
- Read the result and press Copy result to use it elsewhere.
How does the line sorter work?
The text is split into lines wherever there is a line break. Each line is then compared with the others using your browser's own sorting rules for language, which put letters with accents next to their plain forms instead of at the very end. In the alphabetical modes, numbers inside the text are treated as numbers, so item 2 comes before item 10. In the number modes, the number at the start of each line is read and the lines are ordered by it, and lines that do not start with a number are placed last. Shuffle gives a random order each time you press the button. Need to join broken lines next? Remove Line Breaks is the tool for that, and it is free like Sort Lines Alphabetically.
Tips for sorting lists correctly
Switch on Ignore case if your list mixes capitals and lower case, otherwise lines may be ordered by how their letters are written. Trim spaces so that a stray space before a word does not change its place. For a list with numbers, such as prices or scores, choose a number order instead of A to Z, because alphabetical order puts 100 before 20 in plain sorting systems. Turn on Remove duplicates to get a clean unique list, and keep your original list until you are happy with the result. Besides Sort Lines Alphabetically, you can count words with Word Counter.
When do you need to sort lines of text?
People sort lines to put names, tags and keywords in order, tidy a list of email addresses, organise a bibliography, sort items for a spreadsheet column, prepare a list of URLs, order words for a glossary, and put a to-do list in a sensible sequence.
Who uses Sort Lines Alphabetically most?
Students and researchers
Put a bibliography, glossary or list of names in alphabetical order.
SEO and marketing teams
Order keyword lists and URLs to make them easier to compare.
Developers and admins
Sort configuration lines, tags and IDs so differences are easy to see.
Things to know before you sort a list
Sorting text is more subtle than it looks. Computers can compare characters by their code numbers, which puts every capital letter before every lower case letter, or they can follow the rules of a language, where a and A sit together. This tool uses the language rules of your browser, so Apple and apple are neighbours when Ignore case is on. Different languages also order letters differently, for example some alphabets place accented letters after the plain ones, so your result follows the language set in your browser. Numbers inside text are read as whole numbers in alphabetical mode, which gives a natural order such as file 2, file 10. Dates written as day, month and year do not sort correctly as text unless they are in year, month, day order.
Sorting terms explained
- Alphabetical order
- An order that follows the sequence of letters in a language, from A to Z.
- Natural sort
- A way of ordering text where numbers are read as numbers, so 2 comes before 10.
- Case-insensitive
- Treating capital and lower case letters as the same when comparing.
- Duplicate
- A line that appears more than once in the list.
Is it safe to sort my list online?
Your list is sorted in your browser as you press the button. It is not uploaded or stored.
Check that Sort Lines Alphabetically stays private
After you type or paste some text, press the Privacy check button under the tool. It compares the size of your text with the data this page has sent out, so you can see for yourself that what you typed stayed in your browser. The page may still send small page-view statistics, and the check lists every request it saw. For a second opinion, open your browser developer tools, choose the Network tab and watch it while you use Sort Lines Alphabetically.
Continue from Sort Lines Alphabetically in another tool
When Sort Lines Alphabetically has finished, a Continue panel appears under the tool with the next steps people use most, starting with Remove Duplicate Lines, then Remove Line Breaks, Case Converter and Word Counter. The result is handed over inside your browser and removed from temporary storage as soon as the next tool receives it.
Created by the ZafarKit team, reviewed by Muzammil Hussain. Last reviewed December 5, 2026.
Found a mistake? Email contact@zafarkit.com and we will fix it.
Sort lines: frequently asked questions
How do I sort a list alphabetically?
Paste the list with one item per line, choose A to Z and press Sort lines. Copy the result from the box below.
How do I sort numbers from low to high?
Choose Numbers, low to high. The tool reads the number at the start of each line and orders by it.
Can it remove duplicate lines while sorting?
Yes. Tick Remove duplicates before pressing the button, and each repeated line is kept only once.
Why does 10 come before 2 in some sorted lists?
Plain alphabetical sorting compares character by character, so 1 comes before 2. This tool reads numbers inside text as numbers in alphabetical mode.
Is my list saved anywhere?
No. It stays in your browser and is gone when you close the page.
How long can the list be?
No fixed limit is set. Lists with thousands of lines sort in a moment, and only very large pasted blocks may slow an older phone.
Does Sort Lines work on iPhone and Android?
Yes, in current mobile browsers. Paste a list, choose an order and copy the sorted result.
Is my list saved or sent anywhere?
No. The lines are sorted in your browser and are gone when you close the page.
How can I check that Sort Lines Alphabetically does not upload my text?
Use the Privacy check button under the tool. It shows how much data you added and how much the page has sent out, with a list of each request. You can also watch the Network tab in your browser developer tools while Sort Lines Alphabetically runs.
Can I use the result of Sort Lines Alphabetically in another tool without downloading it first?
Yes. After Sort Lines Alphabetically finishes, the Continue panel under the tool lets you open the next tool with the result already loaded, and it never leaves your browser.
What to do after you sort your list
To remove repeats without sorting, use Remove Duplicate Lines.
To change letter case, try Case Converter.