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), natural
sorting keeps numbers in human order 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. 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 — 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.