How to sort lines
- Paste your list into the box, one item per line.
- Pick Sort by. Choose Alphabetical, Number, Line length, Reverse current order or Random shuffle.
- Turn on Descending to flip the order, or Case sensitive if capital letters should matter.
- Copy the sorted list or download it.
Sort modes
Alphabetical compares lines using your browser’s language rules, with natural number handling. That puts “file2” before “file10”, which a plain character sort would not. By default capital letters are ignored, so “banana” and “Banana” sit together.
Number takes the first number on each line, such as the price in “Tea 3.50”, and sorts by value. Line length orders by the count of visible characters, so an emoji counts as one.
Reverse current order flips the list without sorting. Random shuffle mixes the lines using a secure random source, which is handy for picking an order for a draw or a quiz.
Empty lines are kept. In an alphabetical sort they gather at the top.
Tips
- Remove repeats first with remove duplicate lines, then sort.
- Sorting names? Check that every line starts the same way, such as surname first, before sorting.
- For a fast turnaround of a list written in a single row, change the separators to line breaks with find and replace.
- To flip the characters inside each line instead, use reverse text.
Good to know
Sorting never edits a line. It only changes the order, so every line you put in comes out again. Equal lines keep their original order, which is called a stable sort. That matters when you sort by length or by number and many lines tie. Sort a list twice, first by one rule and then by another, to get a two-level order.
Privacy
Sorting happens on your device. Your list is not uploaded, saved on a server, or added to the page address.