Paste any messy list and put it in order — A–Z, Z–A, shortest first, or the smart way that knows 2 comes before 10. Blank lines and duplicates can be cleaned in the same pass. The result updates live as you type and change options. Free, no sign-up, all in your browser.
0 lines in → 0 lines out.
Which Sort Order Do You Need?
| Order | Use it for |
|---|---|
| A → Z | Names, keywords, titles, tags — any list a human will scan or search through. |
| Z → A | The same lists, reversed — handy when a tool or spreadsheet expects descending order. |
| Natural | Anything with numbers in it: "Chapter 2" before "Chapter 10", file names, product codes, versions. Plain A–Z puts 10 before 2 because it reads character by character; natural sort reads numbers as numbers. |
| By length | Shortest first finds your punchiest headlines, usernames and tags; longest first finds the ones that will overflow a design or a character limit. |
| Reverse list | Flips the order without sorting — newest-last logs become newest-first, stacks unwind. |
| Shuffle | Random order for giveaway lists, study rotation, playlists — every line stays, the order is chance. (For picking one winner fairly, use a dedicated winner picker instead.) |
Three Sorting Traps Worth Knowing
Capitals jump the queue. In strict character order, every capital letter sorts before every lowercase one, so "Zebra" comes before "apple". That is what the case-sensitive option does. Leave it off (the default) and sorting ignores case, the way a person expects.
Leading spaces sort first. A line that starts with a space floats to the top of an A–Z sort, which is why the trim option is on by default. Turn it off only when the spaces are meaningful, like indented code.
Sorting is not cleaning. Sorting groups duplicates together but keeps them. Tick "Remove duplicate lines" here, or use the dedicated Remove Duplicate Lines tool when you also need a count of what was dropped and which lines repeated. For pulling a list out of a messy document in the first place, the URL Extractor and Email Extractor handle links and addresses; more text tools live in the Free Tools list.
Frequently Asked Questions
Is this line sorter free? Is my list private?
Free, no sign-up, no line limit worth worrying about — and private. Sorting runs in your browser; your list is never uploaded or stored.
Why did "Item 10" come before "Item 2"?
Because plain A–Z reads character by character: "1" is smaller than "2", so anything starting "10…" wins. Choose the Natural order for numbered lists — it compares numbers by value, so 2 correctly comes before 10.
How many lines can it handle?
Tens of thousands of lines sort instantly. Extremely large pastes (hundreds of thousands of lines) may take a moment in the browser, but nothing is sent anywhere while it works.
Does it sort words inside a sentence?
No — this tool sorts whole lines, one item per line. If your items are separated by commas instead, that is a different job: put each item on its own line first (find-and-replace ", " with a line break in any text editor), then sort.
What counts as a duplicate?
Lines that are identical after the other options are applied — trimming happens first, so " apple" and "apple " are the same line once trimmed. Case matters for duplicates ("Apple" and "apple" are different lines) unless you spot them in the sorted output, where they will sit side by side.
Can I sort by a second column, like a spreadsheet?
No — this is a one-list, one-key sorter, deliberately. Multi-column sorting belongs in a spreadsheet, where each row's data stays attached. Sorting detached columns here would scramble your data.
Thanks for reading! Sort Lines A–Z you can check out on google.
