Count Persian words the right way
A reliable Persian word count depends on one detail most counters get wrong: the
zero-width non-joiner. Persian uses this invisible character to glue
prefixes and suffixes to a stem without a space, so میروم (“I go”) is one
word even though it contains two morphemes. This tool counts the way a Farsi
reader would.
How it works
The counter normalises punctuation, then splits the text on whitespace only. Because ZWNJ is not whitespace, a compound joined by ZWNJ stays a single token.
- Persian and Latin punctuation (
، ؛ ؟ . , ! ?, brackets, dashes, quotes) is replaced with spaces before splitting. - Empty tokens are discarded so multiple spaces never create phantom words.
- Tokens that contain a ZWNJ are tallied separately as compounds.
- Sentence endings are counted from
.,!,?, the Persian؟, and۔.
Example and notes
The sentence من به مدرسه میروم و کتابها را میخوانم. counts as 8 words:
the ZWNJ-joined میروم, کتابها, and میخوانم each count once. If you
instead typed a space inside می روم, it would count as two words — the
compound counter helps you catch exactly that.
Everything runs locally in your browser; nothing you type is uploaded.