Toolverse

Line Sorter

Sort any list of lines alphabetically, numerically, or by length — with reverse and case-insensitive options.

5 lines

How to use it

Paste or type your list into the input box on the left. Each line becomes one item, so a shopping list, a set of names, log lines, or CSV rows all work the same way — one entry per row. As soon as there is text, the sorted result appears on the right and updates on every keystroke. Nothing is submitted and there is no button to press; the ordering is recalculated live in your browser. Choose how the lines are compared using the Sort by control. Alphabetical order uses a locale-aware comparison, so accented and non-English letters fall where a reader expects rather than by raw byte value. Numeric order reads the number at the start of each line and sorts by its value, which is why 2 correctly comes before 10 instead of after it; any line that does not begin with a number is pushed to the bottom. Line length order arranges rows from fewest to most characters, a quick way to spot the shortest or longest entries in a large paste. Three toggles refine the result. Reverse flips the whole order after sorting, turning A→Z into Z→A or smallest-to-largest into largest-to-smallest. Case-insensitive treats uppercase and lowercase as the same letter in alphabetical mode, so Apple and apple sit together instead of all capitals landing first. Remove empty lines strips blank or whitespace-only rows before sorting, which cleans up lists that were copied with gaps between them. As a worked example, paste the four lines banana, Apple, cherry, and apple. Plain alphabetical order returns Apple, apple, banana, cherry, because capital A sorts ahead of lowercase letters. Switch on case-insensitive and the pair Apple and apple group together at the top while their original top-to-bottom order is preserved, because the sort is stable. Add Reverse and the same list is delivered from cherry down to Apple. When the order looks right, use the Copy button to put the sorted text on your clipboard. Sorting is a common first step before removing duplicates, comparing two lists, or pasting data into a spreadsheet — if you also need to drop repeated rows, run the result through the Remove Duplicate Lines tool.

Frequently asked questions

How does numeric sorting work?
Lines are ordered by the number at the start of each line, so '2' comes before '10'. Lines without a leading number are placed last.
Is the sort stable?
Yes. Lines that compare equal keep their original relative order, which is helpful when sorting by length or number.
Is my text sent to a server?
No. Sorting happens entirely in your browser; nothing is uploaded.
Can I sort while ignoring capitalization?
Yes. Turn on the case-insensitive toggle in alphabetical mode and uppercase and lowercase letters are treated as equal, so 'Apple' and 'apple' sort together instead of all capitals appearing first.