What is an SMS Segment

A Segment is how SMS are stored and sent to phones. There can be more than one In simple terms, it is what carriers and phone systems use to send messages and calculate per SMS cost. What’s important is pricing is charged by segments and a single SMS message can have multiple Segments in it.

What’s Changed About Segments Since Back In The Day

SMS standards have barely changed since the days of the brick phone. Messages are still sent in 140 byte chunks known as message segments.

When a number communicates with carriers to send out SMS messages, we send them one segment at a time. To figure out how many characters this affords you, we’re going to have to do a little math.

A Little Math, Much Clearer Insight Into Segments

Standard SMS encoding uses the GSM 03.38 character set which takes 7 bits to encode a character. 140 bytes x  8 bits in a byte divided 7 bits leaves us with the 160 character message segment.

Message segments are how Twilio (and the SMS industry as a whole) counts messages.

This means that in addition to your costs, you should also think in terms of segments when you’re analyzing SMS throughput. Throughput varies by the Sending number you’re using, but in all cases it’s counted in terms of Message Segments per Second rather than total messages.

If getting your message out in a certain window is important to you, make sure you know how many segments you’re sending.

How Does The Perfect Message Behave

Going back to your perfect text message, you count up the characters, and something still seems off. You’ve only used 210 characters but it looks like each of these messages has more than two segments.

Properties

Part of the answer lies in the encoding. Notice that this message has UCS2 listed as the encoding instead of GSM. To accommodate a message as lit as this one, Twilio has to use a different character set. You may have noticed if you clicked on the GSM link above that it didn’t contain any ?’s. When you send messages with non-GSM characters such as Emojis we have to use a different type of encoding known as UCS-2. UCS2 takes 16 bits to encode each character so going back to the math we did above we now have a limit of 70 characters (140 bytes * 8 bits in a byte / 16 bits). Besides emojis you should also be careful with accented characters. GSM 03.38 includes some accented characters such as ñ, à, and ö, but does not include others such as á, í, or ú.

Did this answer your question?
😞
😐
😁