An SMS message has a maximum length of 140 bytes. By using a 7bit character set it is possible to have up to 160 characters in a single SMS. A text that contains more than 160 characters must be split into multiple 140 byte message parts. When a message is split into multiple SMS, each part must include a header to indicate that it is a concatenated message. This header has a minimum length of 6 bytes, which leaves us with 134 bytes in each part, or 153 characters when using the 7bit character set. If a message contains characters that are not in the default 7bit character set, UTF16 encoding is used. UTF16 requires a minimum of 2 bytes per character, which leaves us with only 70 characters in a single part SMS, or 67 characters in each part of a concatenated SMS. Some characters, like emojis etc, will occupy 4 bytes. The 7bit character set also includes a few characters that require an escape character and will therefore occupy 2 character slots.
A multipart SMS message using the 7bit character set may not be split so that the escape character and the following character end up in separate parts. A multipart SMS message using UTF16 encoding may not be split so that parts of a character ends up in separate message parts.
NOTE: The SMS standard state that UCS2 character encoding should be used for the fixed-length 16-bit encoding. This character encoding does not support emojis (and characters from other supplementary planes), and has largely been replaced by UTF16 in the real world.
Source code for counting the number of characters and message parts a string will need can be found at: https://github.com/trt2/gsm-charset-utils
While this utility tries to match, as closely as possible, the way messages are handled internally by the TeletopiaSMS gateway, we provide no guarantee that this is the case. The results displayed on this page should be viewed simply as an illustration of how text is converted into SMS messages.
The utility, including the source code listed above, is provided "AS IS". We disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose.