Persian Word Counter

Accurate word count for Farsi right-to-left prose

Count words in Persian/Farsi text with correct handling of the zero-width non-joiner. ZWNJ-joined compounds like کتاب‌ها are counted as single words, punctuation is stripped, and sentence and character counts are included. Runs entirely in your browser.

How does the counter treat the zero-width non-joiner?

Persian writes many compounds, like می‌روم or کتاب‌ها, with a ZWNJ (U+200C) instead of a space. Because there is no space, the counter treats each such compound as a single word, matching how a reader perceives it.

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.