Twilio Smart Encoding: What It Fixes and What It Can't
Updated
Short answer: Smart Encoding is a Twilio setting that swaps look-alike Unicode characters, such as curly quotes and long dashes, for similar GSM-7 characters, so a text can keep the 160-character limit. It does nothing for a message that also contains an emoji or a script such as Korean. Twilio's current pages on the feature don't say whether it is on by default, so check your own setting.
What Smart Encoding does
Twilio's Messaging Services documentation describes it this way: "Smart Encoding detects hidden Unicode characters and replaces them with a similar GSM-encoded character. This helps ensure that your message stays within the GSM-7 160-character-per-segment limit and prevents it from being split into two message segments, which increases your costs."
Without it, a single character outside GSM-7 moves the whole message to UCS-2, where one segment holds 70 characters instead of 160. Twilio's glossary recommends it for that reason: "To assist in reducing messaging costs, turn on the Twilio Smart Encoding feature."
Twilio publishes the full list of replacements, about 270 entries. Here are some of them:
| Character | Replaced with |
|---|---|
| Curly double quotes “ and ” | Straight double quote " |
| Curly single quotes ‘ and ’ | Straight apostrophe ' |
| En dash – and em dash — | Hyphen - |
| Ellipsis … | Three periods ... |
| Bullet • | Hyphen - |
The list also covers fullwidth forms, small capital letters and several Unicode spaces. A 2026 Twilio post sums it up: "The feature won't strip emojis, but it will strip stuff that could otherwise be a problem."
A worked example
Take this 142-character reminder, with a curly apostrophe in "it’s":
Hi Maria, it’s Dan from Acme Roofing. Your free inspection is booked for Tue 3pm. Reply YES to confirm or call 555-0100. Reply STOP to opt out
| Situation | Encoding | Segments |
|---|---|---|
| Smart Encoding off | UCS-2 | 3 |
| Smart Encoding on, so the ’ becomes ' | GSM-7 | 1 |
| Smart Encoding on, with an emoji added at the end | UCS-2 | 3 |
The last row is the catch. Twilio says "Smart Encoding does not transliterate messages that contain emoji [...] or character-based languages such as Korean hangul". The emoji keeps the message in UCS-2, and the curly apostrophe is left as it is. Twilio's 2017 announcement said the same: characters are converted only when there are "no characters that can’t be converted in the message, e.g. emoji or language based characters."
How to turn it on
Smart Encoding belongs to a Messaging Service. Twilio: "To turn on or turn off Smart Encoding, go to Content Settings in your Messaging Service."
- Open the Messaging Service you send through and go to its Content Settings.
- Turn Smart Encoding on.
- If you manage services through the API, the setting is
SmartEncoding: "Whether to enable Smart Encoding for messages sent through the Service instance." - To control it for a single message, set
SmartEncodedwhen you create the message: "Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: true or false." - Send a test that contains a curly quote, then check the segment count Twilio reports for that message.
Is it on by default?
Twilio's current pages on Smart Encoding don't say, and the older evidence points both ways:
- In May 2017, Twilio announced that Smart Encoding "is enabled by default for all new Messaging Services." That post is now in Twilio's archive with a warning that it "may contain outdated information."
- Twilio's own Messaging Segment Calculator loads with Smart Encoding set to "No".
- Since April 2024, messages sent without a Messaging Service are tied to one that Twilio creates for you, named "[Auto-generated] Default Messaging Service". Twilio's changelog entry doesn't say whether Smart Encoding is on in it.
- HighLevel says LC Phone "Pricing matches Twilio's rates", and its cost article says "The platform automatically switches to UCS-2 encoding whenever an SMS includes characters outside the GSM-7 set." Its pricing and cost articles don't say whether Smart Encoding is used.
So treat the setting as unknown until you have checked it. If you can't see it, fix the text yourself.
What Smart Encoding can't do
- Messages with an emoji or a character-based script. Nothing in them is converted.
- Characters that aren't on Twilio's list. Only the listed characters have replacements. Accented letters such as á, í and ú are outside GSM-7, as Characters That Turn a Text Into Unicode explains.
- Other providers. Smart Encoding is a Twilio feature. Bird says "you can enable smart encoding in your message request options", and Telnyx lets you turn it on "on a messaging profile (applies to all messages) or on a per-request basis." Elsewhere, check your provider's documentation.
- Showing you the result. The swap happens when the message is sent, so the template you review still holds the original characters.
Smart Encoding or fixing the text first
Smart Encoding suits Twilio senders who control their own Messaging Service. It swaps the characters at send time, with no change to how you write.
Fixing the text first helps in the cases Smart Encoding doesn't cover:
- You can't see or change the setting, for example on a platform that sends through Twilio for you.
- The message also contains an emoji, so Smart Encoding does nothing.
- You send through a provider that doesn't offer it.
- You want the template you approve to be exactly what recipients get.
You can also do both: clean the template, and leave Smart Encoding on to catch anything pasted in later.
Precheckly's free SMS segment calculator highlights each character outside GSM-7 and replaces look-alike characters in one click, with undo, so the fix is in your template before it reaches any provider. To see what each segment costs, read How SMS Is Billed.
Sources
- Messaging Services, Twilio
- List of characters replaced by Smart Encoding, Twilio
- Services resource, Twilio
- Messages resource, Twilio
- How long can a message be?, Twilio
- Copilot Just Got Even Smarter: Announcing Smart Encoding, Twilio
- Messaging Segment Calculator, Twilio
- Messaging API response & Logs with default messaging service, Twilio
- Getting the Most for Your Money Using Automated SMS, Twilio
- LC Phone Pricing & Billing Guide, HighLevel
- How to Calculate SMS and MMS Costs, HighLevel
- SMS segment calculator, Bird
- Smart Encoding, Telnyx
Not legal advice. Carrier rules and provider documentation change, so check the linked sources before you rely on them.