Sort lines
Alphabetically, as numbers, by length or shuffled, with ё, ä and ñ landing where they belong rather than at the end.
Drop your files here
.txt, .md, .csv · up to 5 MB
How to Sort
- 1
Paste your list
One item per line. Or drop a .txt or .csv file up to 5 MB.
- 2
Choose how to sort
Six orders, ascending or descending. The result updates as you change anything.
- 3
Copy or download
One click for the clipboard, one for a .txt file.
Why ё and ä end up in the wrong place elsewhere
Sorting strings by comparing them character by character sorts by Unicode code point, and code point order is not alphabetical order in any language including English: it puts every capital letter before every lowercase one, so Zebra comes before apple. In Russian, ё sits far away from е and lands at the end of the list. In German, ä sorts after z. This page uses the browser's built-in collator with your interface language, which knows the actual alphabet, so ё goes next to е and ä goes next to a, exactly where a person looking for it would expect.
item2 before item10
Alphabetical sorting puts item10 before item2, because 1 comes before 2 and that is all a character comparison can see. Natural sorting reads runs of digits as numbers, so item2, item10 and item100 come out in that order. This is the right choice for anything with a number in the name, such as filenames, version strings and chapter headings, and the wrong one only when you genuinely want the character order.
Sorting by a column
Set a column number and pick a separator, and the sort key becomes that field rather than the whole line, but the whole line still comes out in the result, unchanged. That distinction matters: a tool that sorted by the third column and then gave you only the third column back would have quietly destroyed the rest of your data. Lines that have no such field get an empty key and gather at the start rather than being dropped.
Shuffling is not Math.random
The shuffle here is a Fisher-Yates pass driven by the browser's cryptographic random source. That sounds like overkill for reordering a list, and it is the difference between a shuffle that is actually uniform and one that has a visible bias: on a list of tens of thousands of lines, a naive shuffle leaves some items nearer the top than chance would.
Equal lines keep their order
JavaScript's sort is required to be stable, which means two lines with the same sort key stay in the order they came in. That is what makes sorting by one column and then another work as a two-level sort, and it is why descending order here is produced by reversing after sorting rather than by flipping the comparison, since reversing preserves the property in mirror image.
The list never leaves your device
Sorting happens in your browser as you type. There is no upload, no account and no log, and closing the tab clears it.
Frequently asked questions
Will accented letters sort correctly?
Yes. The sort uses your language's actual alphabet rather than character codes, so ё, ä and ñ land next to the letters they belong with.
How do I get item2 before item10?
Choose the option that reads numbers as numbers. Plain alphabetical order cannot do it.
Can I sort by the second column of a CSV?
Yes. Set the column number and the separator. The whole line still comes out, only the sort key changes.
Are duplicate lines removed?
Only if you ask. There is a switch for it, and a dedicated tool if that is the main job.
Is my list uploaded?
No. It never leaves the browser tab.
How many lines can it handle?
Up to 200 000, within a 5 MB file.
Does sorting change the lines themselves?
No. Trimming and case options affect the comparison only; the lines come out exactly as they went in.