Hindi Character Counter

Count Devanagari aksharas and Unicode code points separately

Free Hindi character counter that reports user-perceived aksharas, raw Unicode code points and UTF-16 length separately, correctly handling Devanagari virama conjuncts. Runs in your browser.

What is an akshara and why does it differ from the character count?

An akshara is a user-perceived syllabic unit — a consonant cluster plus its vowel sign. A conjunct like स्त counts as one akshara but three Unicode code points, so the two numbers legitimately differ.

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.