Twilio segment calculator

Free Twilio segment calculator for Programmable Messaging. Paste a message and read the segment count, GSM-7 or UCS-2 encoding, UDH header bytes, and hex payload before it goes to the Twilio API. Built by Blooio.

0 / 160 septetsSingle segment

Auto stays on GSM-7 until a character falls outside it. GSM-7 is 160 characters, then 153. UCS-2 is 70, then 67.

Segments

0

GSM-7 · 160 left in this segment

Characters
0
Size
0 bytes
110,000
Estimated cost$0.0000

Cost

Provider

Number type

Current rate$0.0083 / SMS

Twilio’s listed rate leaves out carrier fees. A2P registration, toll-free verification, and pass-through charges can add more. Carrier fees

0 × $0.0083$0.0000

Export

Segmentation

Segments appear as you type

Hex

Hex appears as you type

Why this Twilio segment calculator is accurate

Most online "Twilio segment counters" only count characters and divide by 160. That breaks the moment a customer sends a curly apostrophe or an emoji. This calculator implements the full Twilio segmentation logic:

  • 3GPP TS 23.038 GSM-7 alphabet with the extended set (€ [ ] { } \\ ^ ~ |) counted as 2 septets each — exactly how Twilio bills.
  • UCS-2 fallback detection on any non-GSM-7 code point (emoji, smart quotes, Chinese, Arabic, Cyrillic, Hebrew, etc.).
  • UDH-aware segment math: 160/153 for GSM-7 and 70/67 for UCS-2, switching the moment you cross the single-segment limit.
  • Surrogate pair handling — a single 4-byte emoji counts as 2 UCS-2 code units, which is what Twilio actually transmits.
  • Hex payload preview per segment, so you can compare against Twilio Console's Message Details panel when debugging.

If you ever see a mismatch with Twilio Console, paste the hidden character into the calculator and toggle Smart Encoding — it'll show you the exact code points that flipped your message to UCS-2.

What one curly apostrophe costs

A single curly apostrophe (’) in a template flips every send from GSM-7 to UCS-2. A 159-character message that should have been 1 segment becomes 3 segments. At Twilio's US long-code rate of $0.0083 per segment, that is 3× on every message.

Run a template through this calculator before you deploy it. Smart encoding replaces the punctuation that flips a message to UCS-2.

Send iMessage instead of a green bubble

Blooio sends iMessage and SMS from one API, without per-segment billing or 10DLC registration. It connects to HighLevel, n8n, HubSpot, Make, and Zapier.

Twilio segment calculator FAQ

How does the Twilio segment calculator work?

It analyses your text the same way Twilio's Programmable Messaging API does: it auto-detects whether the body fits GSM-7 (160 chars per single segment / 153 per concatenated segment) or has to fall back to UCS-2 Unicode (70 / 67), counts the User Data Header bytes for multi-part messages, and tells you the exact number of segments Twilio will bill you for.

Why does Twilio charge per segment instead of per message?

The SMS protocol caps every segment at 140 bytes. Anything longer is split into multiple segments and reassembled on the recipient's phone. Twilio (and every other SMS carrier) bills per segment because each segment is a separate transmission across the carrier network. A 161-character GSM-7 message costs 2 segments. A single emoji can flip your message to UCS-2 and cost up to 4× more.

Does Twilio count 160 or 153 characters per segment?

Both. A message that fits in a single segment can use the full 160 GSM-7 characters. The moment your message needs 2+ segments, Twilio reserves 7 bytes of every segment for the User Data Header (UDH), leaving 153 GSM-7 characters per segment. UCS-2 works the same way: 70 in a single segment, 67 per segment when concatenated.

Which characters force Twilio to use UCS-2?

Anything outside the GSM-7 alphabet: emojis, smart quotes (' '), em/en dashes (— –), ellipses (…), and any non-Latin script. The single most expensive mistake is pasting copy from Word or Notion — curly apostrophes alone will silently triple your Twilio bill.

Does this match Twilio's own segment count exactly?

Yes. The calculator implements the same GSM-7 (3GPP TS 23.038) and UCS-2 logic Twilio publishes in their docs, including the GSM-7 extended set (€, [, ], etc.) which costs 2 septets per character. If you ever see a discrepancy, it's almost always a hidden Unicode character — turn on Smart Encoding to find it.

Will this work for Twilio WhatsApp, MMS, or RCS?

No. WhatsApp, MMS, and RCS messages are not segmented by the 140-byte SMS rule — they're billed per conversation or per message. This calculator is specifically for Twilio Programmable Messaging SMS and any other SMPP/SMS API (Vonage, Plivo, MessageBird, AWS End User Messaging).

Is there a cheaper alternative to Twilio for iMessage and SMS?

If you want native blue-bubble iMessage delivery (which Twilio can't do at all) and SMS through a single API, Blooio is purpose-built for that. It plugs into the same CRMs and automation tools (n8n, HighLevel, HubSpot, Make, Zapier) and removes the per-segment SMS guesswork entirely.

Related tools