GSM-7 vs UCS-2 encoding: the 3GPP byte math behind 160, 153, 70 and 67
Need to test a text message right now? Use the SMS segment counter to spot offending characters or the SMS limit checker for a quick remaining-unit bar. This protocol reference explains the 3GPP TS 23.038 byte math, exact GSM-7 vs UCS-2 character sets, and why single lookalike characters cut capacity from 160 to 70.
An SMS “character limit” is really a size limit on a 140-byte message, and the number of characters that fit depends on how the text is encoded. Most of the time that is invisible. It becomes visible when a message that looked short is split in two, or when one curly quotation mark cuts the room for the first segment from 160 characters to 70. This guide explains where the numbers 160, 153, 70 and 67 come from, which characters trigger the switch, and how to keep a message in one segment.
Where the numbers come from
A single SMS carries 140 bytes of user data, which is 1,120 bits. The original GSM standard, GSM 03.38 (now 3GPP TS 23.038), defines a 7-bit alphabet, called GSM-7, that packs each character into 7 bits. Divide 1,120 by 7 and you get 160 characters [1][2]. When a message contains a character that the GSM-7 alphabet cannot express, the phone or the sending platform switches the whole message to UCS-2, a 16-bit encoding. Divide 1,120 by 16 and you get 70 characters [1][3].
A message longer than one segment is split, and each piece must carry a User Data Header so that the receiving phone can put the pieces back in order. That header is 6 bytes, so each piece has 134 bytes left. In GSM-7 that is 153 characters ((140 − 6) × 8 ÷ 7 = 153.1, rounded down), and in UCS-2 it is 67 ((140 − 6) ÷ 2) [1][3]. This is why 160 characters fit in one segment but 161 take two segments of 153 and 8, and why a 70-character UCS-2 message becomes two segments at 71 characters.
| Encoding | Bits per character | One segment | Each segment of a longer message |
|---|---|---|---|
| GSM-7 | 7 | 160 | 153 |
| UCS-2 | 16 | 70 | 67 |
Twilio notes one exception: multi-segment toll-free messages sent to the US or Canada carry 152 characters per GSM-7 segment and 66 per UCS-2 segment [1]. Segment sizes also describe the protocol. Carriers and platforms may group and split messages differently on the way to the phone, and a platform bills by the segments it sends [4].
What is in the GSM-7 alphabet
The default alphabet has 128 positions, and it is not ASCII. It covers the English letters and digits, most common punctuation, a number of accented Western European letters and some Greek capitals [2][5]:
- Letters and digits: A–Z, a–z and 0–9.
- Punctuation and symbols: space,
! " # % & ' ( ) * + , - . / : ; < = > ? @ _ $ ¤, plus£ ¥ § ¡ ¿and the line feed and carriage return. - Accented letters:
à ä å æ Æ Å Ä Ç É é è ì ñ Ñ ò ö Ö ø Ø ù ü Ü ß. Note which ones are missing: a lowercaseç,í,ú,áandóare not in the alphabet, even though their neighbours are. - Greek capitals:
Δ Φ Γ Λ Ω Π Ψ Σ Θ Ξ. Greek lowercase letters are not included.
Ten more characters sit in an extension table, reached by an escape character, so each costs two characters instead of one: € { } [ ] \ ^ ~ | and the form feed [2][5]. A message of 80 euro signs uses all 160 positions of a single segment. The backtick ` is in neither table.
The alphabet is the whole story for English. If every character of the message is in the table, the message stays in GSM-7 and you get 160 or 153 per segment. If even one character is missing, everything switches.
The characters that quietly switch a message to UCS-2
Most accidental switches come from characters that look ordinary on screen. Word processors and phones “correct” plain punctuation into typographic forms that are not in GSM-7. Twilio’s documentation describes the commonest case: a text editor changes a straight quotation mark to a curly one, and the message goes from a 160-character limit to a 70-character limit [1].
- Curly quotes and apostrophes (‘ ’ “ ”) instead of the straight
'and". - En and em dashes (– —) instead of the hyphen.
- The ellipsis character (…) instead of three full stops.
- Non-breaking spaces that arrive when you copy from a web page or a document.
- Emoji, and any Chinese, Japanese, Korean, Cyrillic or Arabic text [1].
- Accented letters outside the table, such as the
íin “García”.
Invisible characters count too. A zero-width space copied from a web page is not in the alphabet, so it forces UCS-2 while adding nothing to what you can see. See Emoji, zero-width and hidden characters for how to find them.
Lookalike characters: GSM-7 vs UCS-2 side-by-side
Most unexpected two-segment bills happen because an invisible swap replaces a 7-bit character with a visually similar Unicode character. The table below compares common lookalike pairs and shows what happens to a 100-character message:
| Safe (stays GSM-7) | Trap (forces UCS-2) | Why they differ | Segments for 100 chars |
|---|---|---|---|
' (U+0027 straight apostrophe) | ’ (U+2019 curly apostrophe) | Smart quotes from Word/iOS are outside GSM 03.38 [1] | 1 vs 2 |
" (U+0022 straight quote) | ” (U+201D curly quote) | Typographic quotes switch the whole payload to 16-bit [1] | 1 vs 2 |
- (U+002D hyphen-minus) | – (U+2013) or — (U+2014) | En and em dashes are not in the 128-slot GSM-7 table [2] | 1 vs 2 |
... (three periods) | … (U+2026 ellipsis) | Single-glyph ellipsis triggers UCS-2; three dots stay GSM-7 [2] | 1 vs 2 |
| Space (U+0020) | NBSP (U+00A0) or ZWSP (U+200B) | Non-breaking and zero-width spaces copied from web pages fail GSM-7 | 1 vs 2 |
é è à ù ç? Careful: Ç yes, ç no | á í ó ú ç | GSM-7 includes uppercase Ç and lowercase é è à ù ò ì, but omits lowercase á í ó ú ç [2][5] | 1 vs 2 |
Worked examples
These results were produced by the SMS segment counter, which applies the rules above. In UCS-2, an emoji outside the Basic Multilingual Plane is stored as a surrogate pair, two 16-bit units, so it uses two of the 70 positions [3][5]. Some phones use UTF-16 for this reason, and behaviour can vary by handset and carrier.
| Message | Encoding | Units | Segments |
|---|---|---|---|
| 160 letters “a” | GSM-7 | 160 | 1 |
| 161 letters “a” | GSM-7 | 161 | 2 (153 + 8) |
| 306 letters “a” | GSM-7 | 306 | 2 (153 + 153) |
| 307 letters “a” | GSM-7 | 307 | 3 |
| 99 letters plus one curly apostrophe | UCS-2 | 100 | 2 (67 + 33) |
| 80 euro signs | GSM-7 | 160 | 1 |
| 81 euro signs | GSM-7 | 162 | 2 (152 + 10) |
| 70 Chinese characters | UCS-2 | 70 | 1 |
| 71 Chinese characters | UCS-2 | 71 | 2 (67 + 4) |
| 68 letters and one emoji | UCS-2 | 70 | 1 |
| 69 letters and one emoji | UCS-2 | 71 | 2 (67 + 4) |
Two rows deserve attention. The 81 euro signs split as 152 plus 10, not 153 plus 9, because the counter, like most implementations, does not split the euro sign from its escape character across two segments. A character that does not fit moves to the next one, which leaves the first segment one position short. Platforms can differ on this detail. And the 99-letter message with one curly apostrophe would have fit in one segment of 160 in GSM-7, but takes two once UCS-2 applies.
How to keep a message in one segment
- Type with straight punctuation. Replace curly quotes, dashes and the ellipsis character before sending. The counter has a button that does this and shows how many segments you save.
- Avoid emoji unless you need them. One emoji moves the whole message to the 70-character limit.
- Check names. Accented names are the usual source of a stray non-GSM letter. Decide whether to keep the accent, and know that it costs the 160 limit.
- Count before you send, in the encoding that applies. A character count alone is misleading, because a 100-character message can be one segment or two.
- Look at your platform’s own setting. Twilio, for example, offers a Smart Encoding feature that replaces certain non-GSM characters with GSM equivalents for you [1]. Other providers differ, so test with the actual service.
The counter on this site works in your browser and sends nothing anywhere, but it follows the standard alphabet. Your provider’s own segment calculator remains the final authority on what you will be billed.
Frequently asked questions
How many characters are in one SMS?
A single SMS holds 160 characters if every character is in the GSM-7 alphabet, or 70 characters if any character is outside it and the message uses UCS-2. A message that is split carries 153 GSM-7 characters or 67 UCS-2 characters per segment. [1]
Why does my text count as two messages when it is under 160 characters?
Usually because it contains one character outside the GSM-7 alphabet, most often a curly quotation mark, a long dash, an ellipsis character or an emoji. The whole message then uses UCS-2, which holds only 70 characters in a single segment. Characters from the extension table, such as the euro sign and brackets, also cost two positions each. [1][2]
Do emoji count as one character in an SMS?
An emoji forces the message into UCS-2 and, because most emoji are stored as two 16-bit units, it uses two of the 70 positions. A message of 68 letters and one emoji fits in one segment, and 69 letters and one emoji needs two. [3][5]
Which characters cost two positions in GSM-7?
The euro sign and these symbols from the extension table: { } [ ] \ ^ ~ | and the form feed. Each is sent with an escape character in front of it, so it takes two of the 160 positions. [2][5]
Does Chinese text fit in an SMS?
Yes, but it uses UCS-2, so one segment holds 70 characters and each segment of a longer message holds 67. A 71-character Chinese message takes two segments. [1]
Sources (checked November 2026)
- Twilio Docs, How long can a message be? (160 and 153 characters in GSM-7, 70 and 67 in UCS-2, the curly-quote trap, the toll-free exception, Smart Encoding).
- Twilio Docs, What is GSM-7 character encoding? (the 140-byte and 7-bit arithmetic, the character map, escape characters counting as two) and 3GPP TS 23.038, Alphabets and language-specific information (ETSI copy), the standard that defines the alphabet.
- Twilio Docs, What is UCS-2 character encoding? (16 bits per character, 70 per segment, a 6-byte User Data Header leaving 153 GSM-7 or 67 UCS-2 characters).
- Twilio Docs, Handle SMS messages and delivery receipts (messages may be grouped and split differently by network; billing follows the segments sent downstream).
- Wikipedia, GSM 03.38: the basic table and the extension table of ten characters that take two septets, and the note that some handsets use UTF-16 instead of UCS-2, which stores emoji as surrogate pairs. We used it to cross-check the table in the Twilio glossary against the standard.
- Segment counts in the table were computed by CountText’s own SMS segment counter on 14 November 2026. Its logic is covered by automated tests that include these examples.
Try it: Open the SMS segment counter to see the encoding, the segment count and the exact characters that force UCS-2. Your text stays in your browser.