How to use Line Sorter
- Paste your lines.
- Choose the order: A→Z, Z→A, by length, numeric or random shuffle.
- Tick remove duplicates if you want them dropped in the same pass.
- Press Sort Lines and copy the result.
- Duplicate removal runs after sorting, and keeps the first of each group.
- Blank lines sort to the top in alphabetical mode — delete them first if that is noise.
- Leading whitespace is part of the line, so indented entries sort with the indentation included.
Alphabetical sorting is locale-aware
A to Z uses the browser’s locale comparison rather than raw character codes, so accented letters land where a reader expects rather than after z, and ä sorts next to a. Raw code-point sorting — what a naive implementation does — puts all uppercase before all lowercase, so Zebra comes before apple. Comparison here is case-insensitive, so apple, Banana and cherry interleave the way you would write them down.
Numeric sorting is not alphabetical sorting
Sorted as text, 10 comes before 9, because the comparison is character by character. The numeric mode parses the start of each line as a number instead, so 2, 9, 10, 100 sort properly. It reads the leading number and ignores the rest, which means lines like “3 apples” sort correctly but lines beginning with text do not sort at all — put the number first if you can.
Sorting by length, and shuffling
Length sorting is handy for spotting outliers: the malformed row in an export, the one URL with a tracking query attached, the password that got truncated. Random shuffle uses a Fisher–Yates pass, which produces every ordering with equal probability — worth stating because the common one-line trick of sorting with a random comparator does not, and leaves items suspiciously close to where they started.
Frequently asked questions
Does sorting ignore case?
Can I sort numbers?
Does it remove blank lines?
Why is 10 sorting before 2?
Does sorting change the text of my lines?
Is the random shuffle actually random?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.