← Back to All Telecom Guides • Reading time: 6 minutes
The 140-Byte Origin of Short Message Service
When engineers standardized Short Message Service (SMS) inside the GSM 03.40 specification in the mid-1980s, they designed text messages to fit inside existing cellular signaling frames (MAP/SS7) when mobile channels were idle. The maximum payload available in a single signaling packet was strictly 140 octets (140 bytes = 1,120 bits).
Every character limit in modern SMS messaging—whether 160 characters for standard Latin text or 70 characters for non-Latin scripts and emojis—is a direct mathematical result of fitting characters into those 1,120 bits.
GSM-7: The 7-Bit Default Alphabet (160 Characters)
To maximize the number of Latin characters that could fit inside 1,120 bits, the GSM specification created GSM-7, a 7-bit character encoding table covering 128 standard characters (English letters A–Z, digits 0–9, common punctuation, and select accented European characters).
- Single Segment Calculation:
1,120 bits ÷ 7 bits per character = 160 characters. - Extended GSM-7 Characters: Nine special symbols—including the Euro sign (
€), square brackets ([ ]), curly braces ({ }), backslash (\), caret (^), tilde (~), and pipe (|)—are stored in an extension table. Each extended character requires an escape prefix (`0x1B`), consuming two 7-bit septets (14 bits) instead of one.
UCS-2: 16-Bit Unicode Encoding (70 Characters)
Languages such as Chinese, Arabic, Ukrainian/Cyrillic, Hindi, Japanese, and emojis cannot be represented inside the 128-character GSM-7 table. Whenever an SMS message contains even a single non-GSM-7 character (such as a curly typographic apostrophe ’ or an emoji), the entire SMS payload automatically switches to UCS-2 (16-bit Unicode) encoding.
- Single Segment Calculation:
1,120 bits ÷ 16 bits per character = 70 characters. - Emoji Surrogate Pairs: Modern emojis outside the Basic Multilingual Plane require UTF-16 surrogate pairs (32 bits = 4 bytes), meaning a single emoji consumes 2 UCS-2 characters out of the 70-character budget.
Multipart SMS Concatenation & User Data Headers (UDH)
What happens when a message exceeds 160 GSM-7 characters or 70 UCS-2 characters? The SMS gateway splits the text into multiple segments and prepends a 6-byte (48-bit) User Data Header (UDH) to each segment so the receiving handset can reassemble them into a single seamless bubble.
| Encoding Type | Single SMS Limit | Multipart Segment Size | UDH Overhead per Segment |
|---|---|---|---|
| GSM-7 (7-bit) | 160 characters | 153 characters per segment | 7 septets (49 bits) reserved for UDH |
| UCS-2 (16-bit) | 70 characters | 67 characters per segment | 3 characters (48 bits) reserved for UDH |
How Developers Can Avoid Accidental Double-Billing
Because telecom carriers bill per SMS segment transmitted over SMPP, a single stray Unicode character (such as a smart quote copied from a word processor) can silently reduce your character limit from 160 to 67 per segment—tripling your SMS gateway costs. Always sanitize outbound OTP templates to pure ASCII/GSM-7 unless sending localized non-Latin translations.