SMS

How SMS segments work: counting characters the right way

4 min read

A single SMS holds a limited number of characters. When a message is longer, it is split into segments and each segment is delivered and counted separately. That matters because most providers bill per segment, so a message that quietly grows from one segment to two doubles its cost, and the recipient may see it arrive in pieces on some phones.

The limits

  • GSM-7 text (basic Latin letters, digits and common symbols): 160 characters in one segment, 153 per segment once a message is split
  • Unicode text (for example Hindi, Marathi, or most emoji): 70 characters in one segment, 67 per segment once split

The smaller figure for split messages exists because each segment of a longer message carries a small header, which tells the phone how to reassemble the parts. That header uses part of the space, so a long message holds slightly fewer characters per segment than a short one.

Worked examples

  • A 150-character English message fits in one GSM-7 segment
  • A 161-character English message becomes two segments: 153 characters in the first and 8 in the second
  • A 70-character Hindi message fits in one Unicode segment, while a 71-character one becomes two (67 plus 4)
  • A 300-character English message needs two segments, because 2 × 153 = 306
  • The same 300 characters in Hindi need five segments, because 4 × 67 = 268 is not enough

What pushes a message into Unicode

One character outside the GSM-7 set is enough to switch the whole message to Unicode, which cuts the single-segment limit from 160 to 70. A curly quote pasted from a word processor is a common culprit, as are the long dash, the ellipsis character and non-breaking spaces copied from a web page. The message looks identical to a human but is encoded differently, and the cost can double without anyone noticing.

Characters that count double

A few GSM-7 characters, such as the square brackets, curly braces, the caret, the backslash, the vertical bar, the tilde and the euro sign, take two character positions. A message full of these reaches the limit sooner than its visible length suggests.

Emoji and symbols

Emoji are Unicode, so they force the whole message into the 70-character limit, and many take two positions each. They are also often rejected in registered templates. Unless a template is specifically approved with them, plan to leave them out of transactional and OTP messages.

Variables and worst-case length

In a registered template, the fixed text is known but the variables are not. A name, an amount or a link can be short in your test and long in real life. Work out the worst-case length by filling every variable with its longest realistic value, then check that the total still fits. A long customer name or a long tracking link is the usual reason a message that passed testing spills into a second segment in production.

Regional-language messages

Hindi, Marathi, Tamil and other Indian-language scripts need Unicode, so each segment holds fewer characters. That is not a reason to avoid them, because customers often respond better to their own language, but it does mean keeping the text tight. Write the shortest natural sentence, avoid decorative punctuation and register the template in that language rather than relying on a translation of an English one.

Why counts can differ between phones and providers

The segment count is decided when the message is sent, by the platform that encodes it, not by the phone that displays it. Most modern phones stitch the parts of a long message back together so it reads as one, which hides the fact that it was billed as several. Different platforms also detect Unicode in the same way, so a count from one tool should match your provider’s count if the text is identical, but only if hidden characters are identical too. Always check the count in the same tool you send from.

Planning cost with segments

Budget by segments, not by messages. If you send 100,000 messages a month and 20,000 of them are two segments long, you are paying for 120,000 segments, a fifth more than the headline number. Review a sample of real, fully populated messages each month, find the ones that run over, and shorten the template or the variables that cause it. A one-time fix often removes a permanent cost.

How to stay in one segment

  • Write the shortest message that still carries the information
  • Use straight quotes and plain punctuation
  • Keep variables short, because a long name or link can add a segment
  • Retype pasted text instead of pasting it, to strip hidden characters
  • Test the final text in the demo on our home page before registering the template

Checking before you register

Count the characters of the final template with its longest variable values, check that it contains only GSM-7 characters if it is meant to be a single segment, and keep the final text next to the template ID in your records. Our guide to DLT templates explains what to register, and the delivery reports guide shows how to confirm what was actually sent and billed.

Related services