Skip to content

Sort Words

Sort words alphabetically.

Input
Output

No result

About Sort Words

Sort Words takes the words out of a passage, orders them alphabetically, and returns them as a space-separated list. It is the quickest way to check whether a set of terms is complete, to spot a duplicate, or to compare two lists of tags without reading them side by side.

The words are extracted as sequences of letters and numbers, which means punctuation is left behind rather than sorted along with the words. Ordering uses locale-aware comparison, so accented characters sort where a reader of that language would expect them and the case difference between an initial capital and a small letter does not separate otherwise identical words.

Expect a normalised output rather than a reordering of your original text. Because the words are re-emitted with single spaces between them, the punctuation and the original spacing are not restored; what you get is a clean alphabetical word list. That is exactly what makes it useful for comparison work and makes it unsuitable as a way to tidy up a sentence.

How to use Sort Words

  1. 1 Paste the words or the passage you want sorted.
  2. 2 Read the alphabetical list, one word after another on a single line.
  3. 3 Compare it with another sorted list to spot differences, missing terms or duplicates.

Frequently asked questions

Where did the punctuation go?

Words are taken as runs of letters and numbers, so punctuation between them is not part of any word and is not carried into the output. The list contains the words themselves, which is what makes two lists comparable.

Are capitalised and lowercase words sorted together?

Yes. Ordering is locale-aware, so a leading capital does not push a word away from its lowercase equivalents. Without that, an all-capitals term would sort to the front of the list regardless of its spelling.

Does it remove duplicates?

No, every occurrence is kept, so a word appearing three times appears three times in the list. Removing repeats is a separate operation, which is why the list is also a quick way to see how many times a term was used.

Can I use the output to compare two lists?

That is its strongest use. Sort both lists and put the results side by side, and any term present in one but not the other becomes obvious as a misalignment rather than something you have to hunt for.

Free, online, and private

Free to use

Sort Words is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How Sort Words behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Word tokenisation runs of Unicode letters and digits — every other character, punctuation included, is discarded
Comparison localeCompare with no locale argument, so the runtime default collation decides the order
Duplicates kept — a word repeated three times appears three times in the output
Output layout all words on one line separated by single spaces; the input line breaks are gone
Empty or unmatched input returns an empty string

Compiled from the implementation of this tool and checked against it by itoolnet.

What Sort Words does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • Punctuation is deleted rather than moved. An apostrophe splits a word in two, so "don't" is sorted as the separate tokens "don" and "t", and a trailing full stop simply vanishes — the sorted list cannot be pasted back as running text unedited.
  • Nothing is passed to localeCompare except the two strings: no locale, no numeric flag and no sensitivity setting. The order of uppercase against lowercase and of accented letters therefore depends on the browser and operating system, and numeric strings are compared as text, so "10" sorts before "9".
  • The layout is flattened into a single line, so words that were on separate lines merge together and the original line structure cannot be recovered from the output. There is also no way to sort within each line separately or to leave the arrangement of lines alone.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to Sort Words with the snippet below. It is free, runs entirely in your browser, and needs no signup.