Twilio SMS Segment Calculator – GSM-7 / UCS-2 & Cost
A developer-focused SMS segment calculator that mirrors how Twilio splits and bills messages. Paste your message body to see the encoding Twilio will pick (GSM-7 or UCS-2), the exact segment count, the per-segment character limit, which characters are forcing Unicode, and an estimated campaign cost from your price per segment and recipient count. A Smart Encoding toggle previews the segment count after Twilio's automatic character substitutions. Everything runs locally in your browser — your message is never sent to Twilio or stored.
🔒 Runs entirely in your browser — your message body is never sent to Twilio or stored.
| Encoding | — |
|---|---|
| Characters | 0 |
| Segments billed | 0 |
| Limit per segment | 160 |
| Used in last segment | 0 |
| GSM-7 extended chars (count ×2) | 0 |
How Twilio splits a message into segments
When you send an SMS through Twilio, the message body is encoded before it leaves the platform. If every character belongs to the GSM-7 alphabet, Twilio uses GSM-7 and fits 160 characters in a single segment. The moment one character falls outside that alphabet — an emoji, a curly quote pasted from a word processor, an em dash, or many accented letters — Twilio switches the entire message to UCS-2, where a single segment holds only 70 characters.
Longer messages are sent as concatenated SMS: each part reserves a 6-byte User Data Header so the recipient's phone can stitch them back together in order. That overhead is why multi-segment limits are 153 (GSM-7) and 67 (UCS-2) rather than the full 160 and 70. Because Twilio bills per segment, a stray Unicode character can quietly multiply your cost — the offender list above exists so you can catch it before it ships.
Twilio's official segment calculator shows the same GSM-7/UCS-2 segmentation; this page adds a cost estimate, campaign totals across recipients, a Smart Encoding preview, and the exact characters to swap so a message stays in GSM-7.
Need a non-developer view, or want to clean problem characters? Try the SMS length calculator for a marketing-focused breakdown, or the safe emoji for SMS/MMS tool to pick characters that survive every carrier.
Reading num_segments from the Twilio API
After a send, Twilio reports how many segments it actually billed on the Message resource. In Node.js:
const msg = await client.messages.create({ to, from, body });
console.log(msg.numSegments); // "3" — note: a string, not a numberThe Python equivalent is message.num_segments — also returned as a string, so cast it before doing math on it. For inbound messages, the same value arrives on your webhook as the NumSegments POST parameter.
If the value Twilio reports is higher than you expected, paste the exact body into the calculator above — the usual culprits are a pasted curly quote or invisible character from Word or Google Docs, which the offender list will flag.