SMS character counter: Count SMS characters, encoding and segments
Type or paste a message to see its characters, whether it goes as GSM-7 or Unicode, how many segments it needs, and which characters force Unicode.
Characters
78
Encoding
Unicode
UCS-2
Segments
2
67 per part
Left
56
before another part
Preview, characters forcing Unicode highlighted
Your Acme code is 482913. It expires in 5 minutes. Don’t share it with anyone.
1 character force Unicode
- ’U+2019, 1x, replace with "'"
Cost per message
On DiOTP OTP plans: one OTP charge per message (₹0.26 to ₹0.40 before GST)
DiOTP prices OTPs per OTP, not per segment: the API sends your code on a fixed OTP template, so the segment count above does not change the price.
For general SMS, carriers bill per segment. This text would be billed as 2 segments.
Embed this tool
Add the SMS character counter to your own site or documentation for free. Paste this code where you want it to appear; it shows the tool only, with a small link back to this page.
How the SMS character counter works
An SMS is not measured in plain characters. The network first chooses an encoding for the whole message, then counts units in that encoding. This counter does the same, in your browser, as you type.
If every character is in the GSM 03.38 alphabet, the message goes as GSM-7. That alphabet holds the English letters, digits, common punctuation and some accented letters such as é, ü and Ñ. A few characters come from the extension table: ^ { } \ [ ] ~ | and €. Each of those counts as two, because it is sent as an escape plus the character. One GSM-7 message holds 160 units.
If even one character is outside that alphabet, the whole message switches to Unicode (UCS-2). Hindi and every other Indian script, emoji, the rupee sign ₹, and the curly quotes and long dashes that word processors insert all do this. A Unicode message holds 70 units, and most emoji take two.
Longer messages are split into parts and joined on the phone. Each part loses a little room to the joining header, so a concatenated GSM-7 part holds 153 units and a Unicode part holds 67. The counter shows the characters, the encoding, the number of segments and how many units are left before another part is needed. It highlights every character that forces Unicode, and where there is a safe GSM-7 look-alike it offers to replace it.
Worked examples
The sample reads "Your Acme code is 482913. It expires in 5 minutes. Don’t share it with anyone." It looks like plain English, but the apostrophe in "Don’t" is a curly one, U+2019, so the whole message is Unicode. At 78 characters that is more than the 70 one Unicode part holds, so it needs two parts. Press "Replace look-alikes" and it becomes GSM-7: the same 78 characters now fit in one part, with room for 160.
A 200-character English message is GSM-7 and needs two parts (153 + 47). The same message with one ₹ sign becomes Unicode, and 200 units need three parts of 67.
A Hindi OTP such as "आपका OTP 482913 है। इसे किसी से साझा न करें।" is around 45 characters, well inside the 70 a single Unicode part holds. Short regional-language OTPs fit in one part; long regional-language messages grow parts quickly.
What a message costs
On DiOTP OTP plans you pay one OTP charge per code, between ₹0.26 and ₹0.40 before 18% GST depending on the plan you recharge. The API sends the code on a fixed OTP template, so you never pay for extra segments. The counter says this plainly next to the segment count. See DiOTP pricing or work out a monthly figure with the OTP cost calculator.
General SMS, such as alerts or messages you write yourself, is a different case. Carriers bill per segment, so a message of three parts costs three times one part. That is when this counter saves money: trimming a few characters, or replacing one curly quote, can halve the bill for a long message. For bulk and transactional SMS on DiOTP, talk to us.
India-specific notes
Every business SMS in India must match a template registered on DLT, and the template's encoding follows its text. Hindi and regional-language templates are registered and sent as Unicode. If you plan to send in Hindi, Tamil, Marathi or another language, write the template short, and check its length here and in the DLT template checker.
The rupee sign is a common surprise. "₹500" makes a message Unicode; "Rs. 500" or "INR 500" keeps it GSM-7. The same goes for curly quotes copied from documents and the long dash. Your sent message must match the registered template exactly, so make the change in the template itself, not only in your code.
If you are new to message categories, the guide to SMS types in India explains transactional, service and promotional SMS, and OTP SMS cost in India explains what drives OTP prices.
Related reading
SMS length: questions
160 characters in GSM-7, or 70 in Unicode. When a message is longer it is split into parts of 153 GSM-7 characters or 67 Unicode characters each.
One character outside the GSM-7 alphabet switches the whole message to Unicode. Curly quotes, long dashes, the rupee sign and emoji are the usual causes. The counter highlights them and can replace the common look-alikes.
The extension table characters: ^ { } \ [ ] ~ | and the euro sign. Each is sent as an escape character plus the character, so it uses two of the 160 units.
For general SMS billed per segment, often yes, because a Unicode part holds 70 characters instead of 160, so a long Hindi message needs more parts. On DiOTP OTP plans the price is one OTP charge per code whatever the language.
No. DiOTP charges per OTP, between ₹0.26 and ₹0.40 before GST depending on the plan, because the API sends a fixed OTP template. Per-segment billing applies to general SMS.
Start building your customer messaging with DiOTP
Free test credits on sign-up, API keys in a minute, and a team that picks up the phone.
