Blog
Text tools

Sort words alphabetically

Type or paste one word or short phrase per line, and every individual word across the whole text is pulled out, sorted A to Z, and joined back into a single ordered list with the separator you pick — this sorts words, not the lines they came from, so it's a different tool from String Sorter.

Your data never leaves this device

Result

Words sorted

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Unit sorted Individual words, found anywhere in the text regardless of line breaks
Word definition Any run of non-whitespace characters — punctuation attached to a word stays attached
Case handling Case-insensitive by default: "Apple" and "apple" compare equal
Output separator Space, comma-space, or one word per line — your choice
Duplicate words Kept; if a word appears three times, it appears three times in the result
Line breaks in input Ignored for sorting purposes — only used to separate words from each other

When it misleads you

How it is calculated

The whole text — including across line breaks — is scanned for runs of non-whitespace characters using a regular expression; each run becomes one "word" to sort, regardless of which line it was on.

With case-insensitive comparison on, each pair of words is lowercased before comparing, so capitalization has no effect on where a word lands — only its letters and their sequence decide the order.

The words are sorted with JavaScript's Array.sort using that comparator, producing a single flat, alphabetically ordered list with no memory of the original line breaks.

The sorted words are joined back together using whichever separator you picked: a single space, a comma and space, or a line break between every word.

Questions and answers

Does this sort my lines or my words?

Words. Every word in the text is pulled out individually and sorted, regardless of which line it came from. To sort whole lines instead, use String Sorter.

What happens to the original line breaks?

They're not preserved — the output is a single ordered list of words joined with the separator you chose, not the original multi-line layout.

Are duplicate words removed?

No. If a word appears multiple times in your text, it appears the same number of times in the sorted result.

Can I get one word per output line instead of space-separated?

Yes — pick "one per line" from the separator dropdown and the result becomes a new list with one sorted word per line.

Is my text uploaded anywhere?

No. Sorting happens entirely in your browser; nothing is sent to a server.

Related tools

All tools