Sort Lines
Paste a list with one item per line and put it in order: alphabetical, natural (item2 before item10), by length, reversed or shuffled.
Paste or type up to 5 MB and 500,000 lines. It stays on this page: nothing is sent anywhere or saved.
Paste a list above, one item per line, to sort it.
Everything happens on this page, on your device: your list is never sent anywhere or saved.
Put any list in order
A list of names, a glossary, a set of file names or a column copied out of a spreadsheet is easier to read and check when it’s in order. Paste it with one item per line, choose an order, and copy the result. Every line is kept, repeats included: this tool only changes the order.
How to use it
- Paste or type your list, one item per line, up to 5 MB and 500,000 lines.
- Choose an order. The result updates as you type.
- Tick or untick the options next to the order.
- Copy the result, or download it as a .txt file.
The orders
- A to Z and Z to A: alphabetical, with accented letters next to their plain ones, so é sorts with e. Digits come before letters and are compared one at a time, so item10 comes before item2.
- Natural order: runs of digits are read as whole numbers, so item2 comes before item10, and 9 before 10.
- Shortest first and Longest first: by the number of characters, counting an accented letter or an emoji once.
- Reverse the order: the last line first, with no sorting.
- Shuffle: a random order, with every order equally likely. Press Shuffle again for another.
The options
- Ignore case: Apple and apple count as the same, so they stay in the order you had them. With it off, small letters come first: apple before Apple.
- Trim spaces: removes spaces and tabs at the start and end of each line, which would otherwise put those lines first.
- Remove empty lines: drops blank lines and lines holding only spaces, which would otherwise gather at the top.
Good to know
- Lines that compare the same, or have the same length, keep the order they had.
- Sorting follows English alphabetical rules. Languages with their own order, such as Swedish, which puts å after z, aren’t followed.
- Natural order reads 1.10 after 1.9, which suits version numbers but not decimals or negative numbers.
- Need each line once? Remove Duplicate Lines removes repeats and compares two lists. This page keeps every line and only changes the order.
- Picking names, not ordering them? The Random Name Picker draws names and makes groups.