BroHelp.me

Word Counter

Counting the number of words in the text.




Number of Words - 0

How This Converter Works

Counts non-empty runs of non-whitespace characters as words. Empty or whitespace-only input returns 0.

Formula or rule

Words = input.trim().match(/\S+/g) || []; count = Words.length.

Example

Input
red
blue sky
Calculation
Whitespace separates the three non-empty word runs: red, blue, and sky.
Result
3
© BroHelp.me 2026 - 2026 is provided without warranty of any kind.