SMS Character Count

2013-08-25 | Javascript | sms

It is commonly known that Twitter allows 140 character messages, and some will tell you that a single SMS message is limited to 160 characters. However, it’s not as simple as that. In the US a single SMS message can contain 140 bytes of data, which if using GSM encoding, we can squeeze up to 160 7-bit characters. Those 7-bit GSM characters don’t match up with normal ASCII characters, and even worse, not all characters take 7 bits, some take up 14 bits (for example the { character)!

When we start talking about messaging in non-latin scripts, such as Chinese, then a different encoding must be used. In the SMS world the encoding of choice is UCS-2, which uses 16 bits per character. This limits a single part message to 70 characters (down from 160).

On top of that, most SMS clients will let you send concatenated SMS messages. That is, multiple message parts that appear as one long SMS message. A two part message allow up to 304 characters, not the 320 (160×2) you might expect. This is due to the overhead required to store meta data about each part.

This all makes it very hard to count how long a SMS message will be, what characters are allowed, and how many parts it will take. To help with these isuses, I’ve created this simple tool which allows you to type out your message, and see how well it’ll fit

SMS Character Count
https:/blog.bramp.net/sms/

comments powered by Disqus