• 228 destinations
  • No KYC, ever
  • Bitcoin, Monero, USDT and 4 more

Encoding and length

Character counter

A character counter shows, as you type, the encoding a message will use, how many characters remain in the current segment and how many segments the message will cost.

Counting SMS characters is not the same as measuring string length. A reliable counter works in three steps. It detects the encoding from the characters present, since one character outside GSM-7 means UCS-2 for the whole text. It weighs each character correctly: two positions for every extended GSM character, two units for most emoji. And it applies the right capacity per part, 160 or 153 in GSM-7 and 70 or 67 in UCS-2, to give the segment count. A counter that only reports length is how a 161-character message gets sent at double cost.

The remaining-characters figure is where the arithmetic of concatenated messages shows. At 160 GSM-7 characters the counter reads 0 left in one segment; type one more and it should read 145 left across two, because two parts hold 306 characters and 306 minus 161 is 145.

For personalised campaigns the counter has to run on rendered rows, not on the template. Take a hypothetical text of 150 fixed characters plus a {first_name} placeholder. A 10-letter name renders at exactly 160 characters, one segment; an 11-letter name makes 161, two segments; a 10-letter name containing ë turns that row into 160 characters of UCS-2, three segments. The template looks safe in all three cases.

Three mistakes are common when building or choosing a counter:

  • Relying on a programming language's string length. Depending on the language it counts bytes, 16-bit units, code points or visible characters, and none of these equals GSM-7 positions.
  • Ignoring line breaks. Each one uses a character, and a Windows line break, carriage return plus line feed, can use two.
  • Checking only the template of a personalised campaign.

At SMSMeteor: the composer's counter shows the encoding, the segment count and the longest rendered row across the actual list, counts each extension character as two and names the character that forced Unicode. The API returns encoding and segments for every message, and a test key returns them without sending or billing anything.

Go further

See the term in practice.An email address opens the account, the rate card is public, payment is crypto, the test key is free.
Start sending