An initialism or acronym is formed by taking the first letter of each word in a phrase. This generator does that instantly and offers the small refinements real acronyms use, such as dropping connecting words and adding periods.
How it works
The phrase is split into words on whitespace, and the first letter or digit of each word is collected:
words = phrase.split(/\s+/)
for each word:
if skipSmallWords and word in {of, the, and, ...}: skip
take the first letter or digit of the word
result = letters joined (optionally with periods), optionally uppercased
Leading punctuation is ignored so a quoted or parenthesised word still contributes its first real character. Stop words are only skipped after the first letter, so a leading “The” is never dropped from the start.
Example and tips
Portable Document Format produces PDF. With small-word skipping turned on,
North Atlantic Treaty Organization produces NATO. Enable periods for a
classic style such as U.S.A.. For brand or project names, try the result both
with and without small words to see which abbreviation reads best.