SMS length and allowed characters

Supported Character Sets

SMS text can be sent in one of two encodings, depending on the character set used to write the message.

GSM encoding (Latin alphabet, 7 bit)

If the text contains only the characters from the table above, the SMS will be sent in GSM encoding:

@ Δ SP 0 ¡ P ¿ p
£ _ ! 1 A Q a q
$ Φ " 2 B R b r
¥ Γ # 3 C S c s
è Λ ¤ 4 D T d t
é Ω % 5 E U e u
ù Π & 6 F V f v
ì Ψ ' 7 G W g w
ò Σ ( 8 H X h x
Ç Θ ) 9 I Y i y
LF Ξ * : J Z j z
Ø + ; K Ä k ä
ø Æ , < L Ö l ö
CR æ - = M Ñ m ñ
Å ß . > N Ü n ü
å É / ? O § o à

CR - carriage return character
LF - line break character
SP - space character

This encoding allows you to send up to 160 characters in one SMS message. Also note that in GSM-7 encoding there are some characters which are counted as two characters when calculating the SMS length, below is a table of such characters:

^ { } \ [ ~ ] |

Unicode encoding (Cyrillic, extended character set)

If at least one non-GSM encoded character is present, the SMS message will be sent in Unicode encoding. Such message can contain up to 70 characters. Only characters from Unicode table (UTF-8) with codes in range from U+0000 to U+9999 are supported, all other characters are not supported at the moment.

SMS length

The length of a single message consisting only of GSM-alphabet characters is 160 characters.

The length of a single Unicode message is 70 characters.

If an SMS message exceeds the specified length, it is divided into parts - segments.

Each SMS segment contains a special header (several characters of service information) for subsequent concatenation on the recipient side, so the maximum length of one segment in a long message is 153 characters in GSM encoding and 67 characters in Unicode.

The maximum length of an SMS is 140 bytes. Each character in the GSM alphabet is coded with 7 bits (except for a few which are coded with 14 bits). This allows up to 160 symbols (140*8/7=160) in 140 bytes allocated for SMS text. If in SMS text even one non-GSM character is used, the whole text is transmitted in Unicode encoding. In this case the allowed number of characters in a single message is reduced to 70, since in Unicode each character is encoded using 16 bits (140*8/16=70).

For long SMS messages a header (or UDH) is used, which contains 6 bytes of service information, which takes 7 characters when using only Latin characters or 3 characters when using Unicode. Accordingly, the maximum text length in one segment is 153 characters for GSM and 67 characters for Unicode encoding.

Number of segments in SMS Number of characters in SMS
GSM encoding Unicode encoding
1 160 70
2 306 134
3 459 201
4 612 268
5 765 335
6 918 402
7 1071 469
8 1224 536
9 1377 603
10 1530 670