SMS Character and Segment Counter

Count SMS segments (GSM-7 160/153 or UCS-2 70/67), list the characters that force Unicode, get an unaccented GSM-safe version and check a brandname.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

An SMS holds 160 characters of the GSM 7-bit alphabet, or only 70 as soon as one character is outside it (UCS-2), and long messages are split into parts of 153 or 67 characters. Every Vietnamese accent, curly quote or emoji therefore doubles or triples the cost of a message. The API tells you the encoding, the units used (septets or UTF-16 code units, the GSM extension characters ^ { } [ ] ~ | € \ counting twice), the number of segments and what is left in the last one.

It lists each character that forces UCS-2 with its code point, position and suggested replacement, and returns a GSM-safe version of the text: Vietnamese accents removed, smart quotes, dashes and ellipses replaced, emoji dropped, with its own segment count and how many segments it saves. segments=true adds the text of each part, and brandname checks an alphanumeric sender ID (at most 11 characters).

Counting follows 3GPP TS 23.038 / 23.040; carriers may add their own limits on concatenated brandname messages.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/sms-count" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Mã OTP của bạn là 123456, hiệu lực 5 phút."}'

API documentation → Get a free API key

FAQ

Why does one accent change everything?

Vietnamese letters with accents (ă, ơ, ệ…) are not in the GSM alphabet, so the whole message switches to UCS-2: 70 characters instead of 160.

Are é, è, à allowed in GSM?

Yes, a few accented Latin letters (é è ù ì ò à Ä Ö Ñ Ü…) are part of the GSM alphabet, so they do not force UCS-2; the GSM-safe version still removes every accent, as usual for Vietnamese SMS.

How are emoji counted?

As UCS-2, and most emoji take two UTF-16 code units, so 35 emoji fill a single SMS.