This tool counts Devanagari Hindi text the way both a reader and a computer see it. It reports the user-perceived aksharas (syllabic letters) separately from raw Unicode code points, which is essential because Hindi conjuncts pack several code points into a single visible letter.
How it works
The text is first split into Unicode code points. Each code point is classified: independent vowels and consonants are bases that begin a new akshara, while dependent vowel signs, the anusvara, visarga, nukta and the virama (्, U+094D) are combining marks that attach to the previous akshara. The virama is special — when it joins two consonants into a conjunct, the following consonant does not start a new akshara. Whitespace is excluded from the letter counts.
Example
The word नमस्ते (namaste) contains the conjunct स्त:
न म स ् त े
That is 6 code points but only 4 aksharas (न, म, स्त, े attaching to त). A naive .length counter would over-report the perceived letter count.
Notes
Use the akshara count for human-facing “letters” and the code-point or UTF-16 count for storage and field-length limits. Everything runs locally in your browser.