About the Sort Lines
Tezmy's Sort Lines tool puts any list in order in one step. Paste one item per line and choose A to Z, Z to A, shortest or longest first, reverse the current order, or shuffle it randomly. It sorts numbers naturally, so “Item 2” comes before “Item 10”, and it can also remove duplicate lines, empty lines and extra spaces at the same time. The sorting runs in your browser, so your list is never uploaded.
Updated October 2026
How to use the Sort Lines
- 1Paste your list into the left box, one item per line.
- 2Pick a sort order, for example A → Z.
- 3Tick the options you want: remove duplicates, remove empty lines, trim spaces, case sensitive.
- 4Copy the sorted list from the right box or download it as a .txt file.
Which sort order to choose
- A → Z: names, words, product lists, glossaries and bibliographies.
- Z → A: the same lists in reverse alphabetical order.
- Shortest first or Longest first: find very short or very long entries, tidy up keyword lists, or line up text neatly.
- Reverse order: flip a list without sorting it, for example a log or a list of dates you pasted oldest first.
- Shuffle: a random order for quizzes, playlists, turns in a game or presentation order.
How natural and case-insensitive sorting work
Simple sorting compares text character by character, which puts “Chapter 10” before “Chapter 2” because “1” comes before “2”. This tool reads the numbers as numbers, so you get Chapter 1, 2, 3 … 10, the order you expect. It also follows the alphabet rules of your browser's language for letters with accents.
By default capital and small letters are sorted together. If two lines differ only by case, they keep the order they had. With Case sensitive ticked, “Apple” and “apple” count as different lines.
Cleaning a list while you sort it
Lists copied from emails, spreadsheets or websites often have blank lines, trailing spaces and repeats. The options on the right clean them in the same step:
- Remove empty lines drops blank lines and lines with only spaces.
- Trim spaces at line ends removes spaces before and after each item, so “ apple” and “apple” sort together.
- Remove duplicate lines keeps the first copy of each line.
- The line counts under the boxes show how many lines went in and how many came out.
On your phone or computer
On a computer, the input and the result sit side by side. On a phone they stack, with the sorted list below your list. In both cases, long-press or tap Copy result to copy the whole sorted list, and paste it back into your notes, spreadsheet or message. To tidy line breaks, use Remove Line Breaks, and use the Case Converter if capital letters change the order you expect.
Features
- Alphabetical A → Z and Z → A
- Natural number order (2 before 10)
- Sort by line length, shortest or longest first
- Reverse a list or shuffle it randomly
- Remove duplicate and empty lines while sorting
- Case-sensitive or case-insensitive sorting
- Copy or download the result
Frequently asked questions
How do I sort a list alphabetically?
Paste the list with one item on each line, choose “A → Z” as the sort order, and the sorted list appears on the right straight away. Press Copy result to paste it wherever you need it.
Why does “10” come after “9” and not after “1”?
The tool uses natural sorting, which reads numbers inside a line as whole numbers. So “File 2” comes before “File 10”, the way a person would order them, instead of the strict character-by-character order some programs use.
Does sorting care about capital letters?
Not by default: “apple”, “Apple” and “APPLE” are treated as the same word and sorted together. Tick Case sensitive if you want them treated as different, which also matters when removing duplicates.
Can I remove duplicates while sorting?
Yes. Tick Remove duplicate lines and only the first copy of each line is kept. If you only want to remove duplicates and keep the original order, use the Remove Duplicate Lines tool instead.
How do I reverse the order of a list?
Choose “Reverse order (flip the list)”. The last line becomes the first, without sorting anything. This is handy for turning oldest-first lists into newest-first.
Is the shuffle really random?
Yes. Shuffle uses your browser's secure random number generator and the Fisher–Yates method, so every order is equally likely. Press Shuffle again for a new order. To pick one winner from a list, the Random Name Picker is easier.
Can I sort a column from Excel or Google Sheets?
Yes. Copy the column from your spreadsheet, paste it into the box (each cell becomes one line), sort it, then copy the result and paste it back into the sheet.
Is my list private?
Yes. The sorting happens in your browser on your own device. Nothing you paste is uploaded or saved.