SMS segment based pricing is determined by the number of segments rather than the number of messages sent. A single text message may be divided into multiple segments depending on its length, character types, and even invisible formatting. Understanding how segments are calculated is essential for managing costs and preventing unexpected charges.
201 = characters
4 = segments
What are segments
A segment is a 140-byte piece that SMS messages are divided into for sending. Messages are transmitted one segment at a time to carriers. Each segment can hold 160 characters with GSM encoding or 70 characters with UCS-2 encoding. This method is used by the SMS industry to count messages for billing and managing message flow.
What are characters
Characters are the individual letters, numbers, symbols, and emojis in your text message. The number of characters you can fit per segment depends on the encoding:
- GSM 03.38 encoding: 7 bits per character = 160 characters per segment
- UCS-2 encoding: 16 bits per character = 70 characters per segment
What causes a message to be split into multiple segments?
Several factors increase segment count:
- Message length - Exceeding 160 characters (GSM) or 70 characters (UCS-2)
- Non-GSM characters - Using emojis, certain accented characters (á, í, ú), or special symbols forces UCS-2 encoding
- Concatenation headers - Multi-segment messages need 6 bytes for reassembly instructions, reducing capacity to:
- 153 characters per segment (GSM)
- 67 characters per segment (UCS-2)
- Hidden characters - Smart quotes (') and non-GSM spaces (like U+2002) can trigger UCS-2 encoding even when the message looks normal.
How are we estimating segments?
Twilio calculates segments using a mathematical approach based on encoding:
- GSM encoding: 140 bytes × 8 bits ÷ 7 bits = 160 characters
- UCS-2 encoding: 140 bytes × 8 bits ÷ 16 bits = 70 characters
- Multi-segment messages: Subtract 6 bytes for concatenation headers (leaving 153 or 67 characters)