When using Short Message Service (SMS), improper handling of character encoding or billing rules can lead to unexpected costs and delivery failures. This guide explains how to estimate your SMS costs, avoid common configuration problems, and ensure an efficient, stable service.
Costs and segmentation
The cost of a message is determined by its encoding method, length, and the number of segments.
Billing
Billing unit: Charged per segment, not per send request.
Formula: Total cost = Unit price × Total number of segments.
Influencing factors:
Encoding: UCS‑2 holds fewer characters per segment than GSM‑7, so it creates more segments.
Length: The longer the content, the more segments are required.
Signatures and variables: The characters used in SMS signatures and variables affect the encoding method and billable length.
Calculate segment count and length
The system automatically selects an encoding method based on the message content. Different encodings have different segmentation rules, affecting the number of segments and the final cost.
If a message contains any non-GSM-7 character, such as a Chinese punctuation mark (,) or an emoji (
), the entire message is switched from GSM-7 to UCS-2 encoding, which increases the number of segments and the cost.
Message type | Character counting | Message segmentation |
English-only messages (GSM-7 encoding) | Standard characters (letters, digits, and common symbols): each counts as one character. Extended characters ( For more information about GSM-7 characters, see GSM-7 characters. Note If a message contains any character not listed as an extended GSM-7 character, the entire message is billed using the rules for UCS-2 encoding. | The maximum length of a single message is 160 characters. If your content exceeds the limit, it is split into multiple segments, each with up to 153 characters. Each segment is billed separately. Example: A 350-character message will be split into three segments (153 + 153 + 44) and billed as 3 messages. |
Messages in other languages (UCS-2 encoding) | Every character (such as Chinese characters, letters, symbols, and spaces) counts as 1 character. | The maximum length of a single message is 70 characters. If your content exceeds the limit, it is split into multiple segments, each with up to 67 characters. Each segment is billed separately. Example: A 150-character message will be split into three segments (67 + 67 + 16) and billed as 3 messages. |
Check characters before sending
To prevent unintended encoding switches, review your message content before sending, especially if you expect to use only GSM-7 characters.
Non-standard characters: Check for non-GSM-7 characters, such as Chinese punctuation, full-width symbols, emojis, or other special symbols. These characters will cause the system to switch from the default GSM-7 encoding to UCS-2 encoding, which increases the number of segments.
Variable value: If your message content includes a variable, check its resolved value for any non-GSM-7 characters. The system determines the encoding based on the whole message content (resolved variable value + static content).
The SMS signature is part of the total message length, and its characters affect the encoding. Factor this in when designing your signature.
Use the content preview tool in the Alibaba Cloud SMS console to see how your message will be encoded and segmented. If you see unexpected results, review your content for problematic characters.
NoteFind the content preview tool in the following locations:
A GSM-7 message of 160 characters or less is billed as one segment. |
A GSM-7 message longer than 160 characters is split into 153-character segments. This example is split into two parts (153 and 8 characters) and billed as two segments. |
The accidental inclusion of a Chinese comma forces the message to use UCS-2 encoding. This example is split into three parts (67, 67, and 25 characters) and billed as three segments. |
Message sending limit
To protect end-users from spam and maintain channel stability, the system limits sending frequency to 20 messages per day to a single mobile number by default.
If the default limit does not meet your business needs, configure a custom sending limit. For more information, see Configure the messaging limit.
GSM-7 characters
The GSM-7 character set is divided into a standard set and an extended set.
The following table lists the characters in the GSM-7 standard set. Each of these characters counts as one character.
GSM-7 standard characters | ||||||||||||
A | B | C | D | E | F | G | H | I | J | K | L | M |
N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
a | b | c | d | e | f | g | h | i | j | k | l | m |
n | o | p | q | r | s | t | u | v | w | x | y | z |
à | Å | å | Ä | ä | Ç | É | é | è | ì | Ñ | ñ | ò |
Ø | ø | Ö | ö | ù | Ü | ü | Æ | æ | ß | 0 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | & | * | @ | : | , | ¤ |
$ | = | ! | > | # | - | ¡ | ¿ | ( | < | % | . | + |
£ | ? | " | ) | § | ; | ' | / | _ | ¥ | Δ | Φ | Γ |
Λ | Ω | Π | Ψ | Σ | Θ | Ξ | ||||||
The GSM-7 extended character set includes the following symbols. Each of these characters counts as two characters because they require an invisible escape character.
^ | { | } | \ | [ | ] | ~ | | | € |
The GSM-7 character set also includes the following non-printing characters. Each counts as one character:
Space
Line feed: A control character that indicates the end of a line of text.
Carriage return: A control character that moves the cursor to the beginning of a line.
Escape: A control character that is automatically added before any character from the extended set.


