Sort Lines
Sort lines of text alphabetically, numerically or by length, and remove duplicates or blank lines.
Paste some lines above to sort them.
How it works
Paste a list with one item per line and the sorted result updates as you type. Alphabetical
sorting compares the lines character by character (case-insensitive by default), "numbers in
human order" keeps numbers the way people read them so item2 comes before
item10 instead of after it, and length sorting orders the lines from shortest to
longest. Flip the direction to sort ZโA, and tick the options to remove duplicate lines, trim
stray spaces or drop blank lines while sorting. Nothing is dropped from your list unless you
ask for it, and the options that would actually change this particular list are the ones
shown in full colour. The whole list is sorted in your browser with JavaScript โ
nothing is uploaded to a server, so it is safe for e-mail lists, keywords, log lines and
anything else you would rather not paste into a random website.
Frequently asked questions
How do I sort lines of text alphabetically?
Paste your list into the box with one item per line. The sorted result appears instantly in the output box, AโZ by default. Switch Direction to Descending for a ZโA sort, and tick "Case sensitive" if you want uppercase letters to sort before lowercase ones instead of being treated the same.
How do I sort lines with numbers in the right order?
Choose "Natural / numeric" under Sort by. A plain alphabetical sort compares characters, so item10 lands before item2. Natural sorting reads the digits as numbers, giving item1, item2, item10, which is the order you would expect from a human-written list.
Can this tool remove duplicate lines while sorting?
Yes. Tick "Remove duplicate lines" and only the first occurrence of each line is kept; the counter under the output shows how many duplicates were dropped. You can combine it with "Trim whitespace" and "Remove blank lines" to clean the list in the same pass. Everything runs in your browser, so your text is never uploaded.