How do I sort a list of lines alphabetically or by number?
Paste your list into FixDoks's Sort Lines tool and choose an order: A to Z, Z to A, numeric, by length, reverse or shuffle. The result updates instantly in your browser. You can also ignore case, remove empty lines and remove duplicates in the same step, then copy or download the sorted list.
Sort Lines at a glance
| Input | A list, one item per line |
|---|---|
| Output | Sorted, reversed or shuffled list |
| Processing | In your browser; your files are not uploaded |
| Price | Free |
| Works on | Chrome, Edge, Safari and Firefox on Windows, Mac, Android and iPhone |
How to use Sort Lines
- Paste your list with one item per line.
- Pick a sort order: A to Z, Z to A, numeric, length, reverse or shuffle.
- Tick any extras: ignore case, remove empty lines, remove duplicates.
- Copy or download the sorted list.
Sort a list the way you need
Paste names, keywords, file names, product codes or any other list, and FixDoks sorts it instantly. Change the order from the drop-down and the result updates straight away.
Sort orders
- A to Z / Z to A: alphabetical order using your browser's language rules, so accented letters like "é" sort next to "e" instead of after "z".
- Numbers: low to high / high to low: sorts by the first number in each line. "Item 2" comes before "Item 10", which plain alphabetical sorting gets wrong. Lines without a number go to the end.
- Length: shortest or longest line first. Useful for finding very long titles or checking short codes.
- Reverse current order: flips the list upside down without sorting it.
- Shuffle: puts the lines in random order using your browser's secure random generator. Good for picking a random winner, making quiz question orders or assigning groups.
Extra options
- Ignore case: "apple" and "Apple" sort together. With it off, the tool still groups them sensibly but separates them by case.
- Remove empty lines: blank lines are dropped instead of collecting at the top.
- Remove duplicates: keeps only one copy of each line after sorting.
Alphabetical vs natural order
| Alphabetical (A to Z) | Numbers: low to high |
|---|---|
| Chapter 1 Chapter 10 Chapter 2 Chapter 3 | Chapter 1 Chapter 2 Chapter 3 Chapter 10 |
Numeric sorting understands negative numbers and decimals such as -4.5, and ignores thousands separators like 1,20,000 or 120,000.
Handy uses
- Alphabetise a class list, guest list or bibliography.
- Sort keywords before comparing two keyword research files.
- Rank a list of prices or scores that you copied from a spreadsheet column.
- Draw a random order for presentations or a lucky draw with Shuffle.
For a bibliography, remember that citation styles have their own rules, for example ignoring "The" at the start of a title. Sort first here, then adjust those few entries by hand.
Sorting Hindi and other scripts
Alphabetical sorting uses your browser's language rules, so Hindi words sort in Devanagari order (अ, आ, इ ...) and accented Latin letters sort with their base letter. When a list mixes scripts, each script is grouped together. Everything runs on your device, and there is no limit on the number of lines.