Sort lines
Sort lines A to Z, Z to A, by number or by length.
Editor
Sort lines: what it does
Put a list in order in one click: alphabetical A to Z or Z to A, by the first number on each line, or from shortest to longest. You can also shuffle the lines into a random order. Sorting follows the rules of the text language.
Sort lines: how to use it
- Paste your list, one item per line.
- Choose how to sort or shuffle.
- Select Apply and copy the sorted list.
Sort lines: when to use it
- Alphabetize a list of names, products or keywords for a report or a glossary.
- Order log lines, prices or scores by the number they contain.
- Shuffle a list of participants or questions to get a random order.
Sort lines: examples
Input
pear apple cherry banana
Result
apple banana cherry pear
Input
Chair 120 Lamp 35 Desk 480 Mug 9
Result
Mug 9 Lamp 35 Chair 120 Desk 480
Sort lines: questions and answers
Does sorting respect accents and capitals?
Yes. Sorting follows the rules of the text language, so “é” sits next to “e” and capitals do not push words to the end.
How does sorting by number work?
Each line is sorted by the first number found in it, so “item 2” comes before “item 10”.
Can I sort case-insensitively?
Sorting already ignores case for ordering, so “apple” and “Banana” sort as a and b. Lines are not changed, only reordered.
Does sorting remove duplicates?
No. Every line is kept. Run Remove duplicate lines afterwards if you want each entry once.
Is my text sent to a server?
No. Everything runs in your browser on your own device, so your text never leaves it.
Related tools
Tools people often use together with this one.
- Remove duplicate lines
Delete repeated lines and keep one copy of each.
- Sort words alphabetically
Sort the words of a text from A to Z.
- Remove empty lines
Delete blank lines from your text in one click.
- Extract numbers from text
List every number found in a text, one per line.
- Split text into lines
Put every word or list item on its own line.
- Reverse text
Flip the text backwards, or reverse words or lines.
- Extract IP addresses from text
List every IPv4 address found in a text, one per line.