# OTP SMS templates: 15 examples and the rules behind them

> 15 ready OTP SMS templates for login, sign-up, payments and resets, with Android and iPhone autofill formats, segment counts and safe wording.

Canonical: https://mobilevalidate.com/blog/otp-sms-message-templates · Last updated: 2026-11-23

![Phone showing three message bubbles, a six-box code, a text ending in an at-sign domain line with a hash tag, and a shield warning, linked to cards for a 160 versus 70 segment meter, a crossed-out headset and a checked sender ID.](https://mobilevalidate.com/images/blog/otp-sms-message-templates.svg)

*A good OTP text: code first, one segment, a never-share line and a registered sender.*


By MobileValidate team (https://mobilevalidate.com/about) · Published: 2026-11-23 · Category: Fraud prevention · Tags: OTP, SMS, Phone verification, Fraud prevention, Deliverability

A good OTP SMS puts the code first, names your brand, says what the code is for and when it expires, and warns the reader never to share it. It fits in one 160-character GSM-7 segment, contains no link, and ends with the autofill line Android or iPhone expects. Below are 15 ready templates, each counted with our SMS segmenter, and the official rules they follow.

## What should every OTP SMS contain?

Six things, in this order:

1. **The code, at the start.** It shows in the lock-screen preview, so the user doesn't have to open the message. Use at least six digits: NIST's SP 800-63B-4 requires out-of-band secrets of "at least six decimal digits" (section 3.1.3.2).
2. **Your brand name**, so the user knows which service sent it. Use the same name as your sender ID.
3. **What the code does**: log in, sign up, reset a password, approve a payment. A code that says what it approves is harder to talk someone out of.
4. **When it expires.** NIST treats an out-of-band authentication as invalid unless completed within 10 minutes, and each secret may be used once. Ten minutes or less is a sound default.
5. **A never-share line** that says what *you* will never do, such as "Acme will never call or text you to ask for this code".
6. **Nothing else.** No links, no offers, no reply instructions. A passcode text that carries marketing can be filtered as promotional, and a link teaches users to tap links in texts.

Two technical rules sit on top: keep it in one segment (see the length section below), and add the autofill line for Android or the domain-bound line for iPhone and the web if your app supports them.

## Which OTP SMS templates can I copy?

Replace `Acme`, `acme.example` and the code with your own. Counts come from running each text through the segmenter behind our [SMS character counter](/tools/sms-character-counter) on 2026-11-07, with `482913` as the code. Counts change with your brand name's length.

| # | Use | Template | Encoding | Characters | Segments |
|---|---|---|---|---|---|
| 1 | Login | `482913 is your Acme login code. It expires in 10 minutes. Acme will never call or text you to ask for this code.` | GSM-7 | 112 | 1 |
| 2 | Sign-up | `Acme: your verification code is 482913. Enter it to finish signing up. Do not share it with anyone.` | GSM-7 | 99 | 1 |
| 3 | Password reset | `482913 is your Acme password reset code. If you did not ask to reset your password, ignore this text and do not share the code.` | GSM-7 | 127 | 1 |
| 4 | Payment approval | `Acme: code 482913 approves a payment of USD 120.00 to Example Store. Never share it. Not you? Call the number on the back of your card.` | GSM-7 | 135 | 1 |
| 5 | New device | `482913 is your code to sign in to Acme on a new device. If this was not you, change your password now. We will never ask for this code.` | GSM-7 | 135 | 1 |
| 6 | Phone number change | `Acme: use 482913 to confirm the change of the phone number on your account. Not you? Do not enter the code and contact support in the app.` | GSM-7 | 138 | 1 |
| 7 | WhatsApp-style wording | `482913 is your verification code. For your security, do not share this code. This code expires in 10 minutes.` | GSM-7 | 109 | 1 |
| 8 | Indonesian | `Kode verifikasi Acme Anda: 482913. Berlaku 10 menit. Jangan berikan kode ini kepada siapa pun.` | GSM-7 | 94 | 1 |
| 9 | Spanish, with accent | `Tu código de Acme es 482913. Caduca en 10 minutos. No lo compartas con nadie.` | UCS-2 | 77 | **2** |
| 10 | Spanish, GSM-7 | `Tu codigo de Acme es 482913. Caduca en 10 minutos. No lo compartas con nadie.` | GSM-7 | 77 | 1 |
| 11 | Hindi, short | `482913 आपका Acme कोड है। 10 मिनट तक मान्य। इसे किसी से साझा न करें।` | UCS-2 | 67 | 1 |
| 12 | Arabic | `رمز Acme الخاص بك هو 482913. لا تشاركه مع أي شخص.` | UCS-2 | 49 | 1 |

Three more, with the autofill lines, are in the next two sections (templates 13 to 15 use line breaks, so they are shown as code blocks).

Template 7 copies the fixed wording of WhatsApp's authentication templates (more on that below), which some teams reuse so SMS and WhatsApp codes read the same. Template 9 shows how one letter doubles the cost: `ó` isn't in the GSM-7 alphabet, so the message switches to Unicode and needs two segments for 77 characters. Template 10 drops the accent and fits one. Whether "codigo" is acceptable to your Spanish-speaking users is your call. Template 11 is shortened on purpose: the longer Hindi version, `482913 आपका Acme कोड है। यह 10 मिनट में समाप्त हो जाएगा। इसे किसी से साझा न करें।`, is 81 characters and needs two segments.

## How do I format the code for Android autofill?

Android offers two ways to read the code without the user typing it.

**SMS Retriever API** (no permission prompt). Google's [documentation](https://developers.google.com/identity/sms-retriever/verify) sets three requirements: the message must "be no longer than 140 bytes", contain the one-time code, and "include an 11-character hash string that identifies your app". The hash is computed from your package name and signing certificate, and Google warns against computing it on the device: generate it once on your build machine and store it on the server. The rest of the text is up to you.

```text
482913 is your Acme code. Do not share it.

FA+9qCX9VSu
```

Template 13 above: 55 GSM-7 characters, one segment. `FA+9qCX9VSu` is the example hash from Google's page; yours will differ, and each app signing key has its own. A single GSM-7 segment is 140 bytes on the network, so a one-segment message meets the byte limit. Keep it in one segment.

**SMS User Consent API** (the user taps Allow once). No hash is needed. Google's [criteria](https://developers.google.com/identity/sms-retriever/user-consent/request): the message contains "a 4-10 character alphanumeric string with at least one number", and if you passed a sender number, it came from that number. Every template in the table above qualifies.

## How do I format the code for iPhone and browser autofill?

Use a domain-bound code, so autofill offers it only on your site or app. Apple's [documentation](https://developer.apple.com/documentation/security/enabling-autofill-for-domain-bound-sms-codes) says that from iOS 14 and macOS Big Sur, "the last line of your message needs your DNS domain name, prefixed by an at sign (`@`), and the one-time code, prefixed by a hash symbol (`#`)", separated by a space. AutoFill then suggests the code only when the website in Safari, or an associated domain of your app, matches. Apple notes that this "makes it harder for an attacker to trick someone into entering one-time codes into a phishing website."

```text
482913 is your Acme code. Do not share it.

@acme.example #482913
```

Template 14: 65 GSM-7 characters, one segment. Mark your input field with `autocomplete="one-time-code"` on the web, or the one-time-code content type in an iOS app. If your login form sits in an iframe on another domain, Apple adds that domain after a `%` sign on the same line.

Chrome uses the same line for the [WebOTP API](https://developer.chrome.com/docs/identity/web-apis/web-otp) on Android, from Chrome 84. Chrome's rules: `@` must be the first character of the last line, a single space separates `@host` and `#code`, and the human-readable text must include a 4 to 10 character alphanumeric code with at least one number. Chrome's page says Chromium and WebKit agreed on this format, and that Safari reads it but doesn't support the WebOTP JavaScript API.

## Can one message work for Android and iPhone?

Usually yes, if you put the Android hash on the line before the domain line:

```text
482913 is your Acme code. Do not share it.

FA+9qCX9VSu
@acme.example #482913
```

Template 15: 77 GSM-7 characters, one segment. Google's rule is only that the hash is included and the message stays under 140 bytes; Apple's and Chrome's rule is that the `@domain #code` line comes last. This layout satisfies both as documented, but test it on real devices with your own hash and domain before you ship it.

## How long can an OTP SMS be: GSM-7 vs Unicode?

One SMS segment carries 160 characters in the GSM-7 alphabet or 70 in Unicode (UCS-2). Longer texts are split into parts of 153 or 67 characters, and each part is billed as one SMS. A handful of GSM-7 characters, such as `€`, `[`, `]`, `{`, `}`, `~` and `|`, count as two. One character outside GSM-7 switches the whole message to Unicode.

Hidden characters cause most surprises. We ran these through the same segmenter on 2026-11-07:

| Text | Encoding | Characters | Segments | Why |
|---|---|---|---|---|
| `482913 is your Acme code. Don’t share it — Acme will never call you to ask for it.` | UCS-2 | 82 | **2** | Curly apostrophe `’` and em dash `—` |
| `482913 is your Acme code. Don't share it - Acme will never call you to ask for it.` | GSM-7 | 82 | 1 | Same text, straight apostrophe and hyphen |
| `Acme: code 482913 approves a payment of €120.00 to Example Store. Never share it.` | GSM-7 | 81 (82 units) | 1 | `€` costs two units but stays GSM-7 |
| `482913 is your Acme code 🔐 Do not share it.` | UCS-2 | 43 (44 units) | 1 | The emoji forces Unicode and takes two units |

The first two rows are identical to a reader and differ only in two characters that word processors insert automatically. If your templates live in a CMS or a translation tool, paste them into the [SMS character counter](/tools/sms-character-counter) before release, and use the [SMS GSM-7 converter](/tools/sms-gsm-converter) to swap curly quotes, dashes and accents for their GSM-7 forms. Both run in your browser.

Some networks and gateways handle national alphabets differently, so check with your SMS provider how it encodes the languages you send.

## What anti-phishing wording should an OTP include?

Tell users what you will never do, in your own voice. The US Federal Trade Commission tells consumers: "Never share a verification code. Ever." It adds that no bank or investment company representative "will ever ask for the verification code" ([FTC, 2024](https://consumer.ftc.gov/consumer-alerts/2024/06/got-call-about-fraud-activity-your-bank-account-it-could-be-scammer)), and that "anyone who asks you for your account verification code is a scammer" ([FTC Military Consumer, 2024](https://www.militaryconsumer.gov/blog/whats-verification-code-why-would-someone-ask-me-it)). Your message should back that up.

Wording that works:

- **"Acme will never call or text you to ask for this code."** It names the scam: someone calls, claims to be you, and asks for the code.
- **Say what the code approves.** "Approves a payment of USD 120.00 to Example Store" makes a scammer's "it's just to verify your account" story fall apart.
- **Give a safe next step** that doesn't depend on the message: "Not you? Call the number on the back of your card" or "contact support in the app". Never a phone number or link inside the OTP itself, because a fake message would carry the scammer's.
- **Keep the same wording every time.** Users learn what a real code looks like, and a variant stands out.

Avoid "reply with your code", links of any kind, and urgency ("act now or your account will be closed"). Those are the marks of smishing messages; see our glossary entry on [smishing](/glossary/smishing).

## Which sender ID rules apply to OTP messages?

More countries now block or relabel branded texts from unregistered senders, and OTPs are included. Four of our country guides cover the rules:

- **India.** Commercial SMS, including OTPs, must use a header and content template registered on an operator's DLT platform, in the right category. See [DLT registration in our India guide](/blog/india-phone-number-format#do-i-need-dlt-registration-to-send-sms-to-india) and [TRAI's 2026 anti-spam rules](/blog/india-trai-anti-spam-rules-2026). Register the OTP template with a placeholder for the code, and make the live text match it exactly.
- **Spain.** Alphanumeric sender names must be in the CNMC's alias registry; operators block unregistered ones. See [the CNMC alias registry in our Spain guide](/blog/spain-phone-number-format#sms-sender-names-must-be-registered-with-the-cnmc).
- **Australia.** From 1 July 2026, texts with an unregistered sender ID reach the user as `Unverified`. See [the SMS Sender ID Register in our Australia guide](/blog/australia-phone-number-format#the-sms-sender-id-register-from-1-july-2026).
- **Nigeria.** Sender IDs are registered with operators and aggregators under contract; OTPs should go on transactional routes. See [SMS, sender IDs and OTP in our Nigeria guide](/blog/nigeria-phone-number-format#what-are-the-rules-for-sms-sender-ids-and-otp).

Our [sender ID glossary entry](/glossary/sender-id) explains the terms. When you add a country, ask your SMS provider what it needs registered before the first send, not after the first block.

## Can I customize WhatsApp OTP text?

No. Meta's [authentication templates](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates) use fixed preset text: "<VERIFICATION_CODE> is your verification code.", an optional "For your security, do not share this code." and an optional "This code expires in <NUM_MINUTES> minutes." You can't change the body. What you choose is the button: copy code; one-tap autofill, which Meta lists for Android (on iOS 26 and later, keyboard suggestions autofill without a button); or zero-tap, Android only.

So the copywriting work happens in SMS, and the WhatsApp side gives you a known wording to match. Template 7 above mirrors it. For the cost side of the choice, see [WhatsApp OTP vs SMS OTP](/blog/whatsapp-otp-vs-sms-otp-cost) and our [OTP cost by country](/blog/otp-cost-by-country) research.

## Should you check the number before sending the code?

For sign-ups and other risky flows, yes. The best template is still wasted on a number that can't receive it, and a code sent to a number an attacker controls is the start of SMS pumping. Our post on [OTP fraud prevention checks](/blog/otp-fraud-prevention-checks-before-sending-a-code) covers the pre-send flow in detail. In short:

- **Line type and carrier.** A [carrier lookup](/services/carrier-lookup) shows whether the number is a mobile, a landline or VoIP before you send. Landlines can't receive SMS, and some abuse runs through VoIP ranges.
- **Live network status.** An [HLR lookup](/services/hlr-lookup) shows whether the mobile is reachable right now, so you can offer another channel instead of a code that will sit undelivered.
- **Rate limits come first.** Number checks add facts; they don't replace per-number, per-IP and per-country limits. See [OTP bombing protection](/blog/otp-bombing-protection) and [SMS pumping: how it works and how to stop it](/blog/sms-pumping-how-it-works-and-how-to-stop-it).

Check only numbers your users entered themselves, for the purpose they entered them for.

## How do you run these checks with MobileValidate?

One API request runs the carrier lookup and the live network check (HLR) on a number before you send the code. Inconclusive results, such as `unknown`, timeouts, invalid numbers and duplicates, are never charged, and invalid numbers are rejected before any check runs.

- **Free tools, no sign-up.** Count segments with the [SMS character counter](/tools/sms-character-counter), clean templates with the [SMS GSM-7 converter](/tools/sms-gsm-converter), and check a number's type with the [phone number validator](/tools/phone-number-validator). The free [carrier lookup](/services/carrier-lookup) answers three numbers a day without an account.
- **Free to build.** [Get a free test key](/get-test-key) to wire up your pre-send check against fixed test answers ([test mode](/docs/test-mode)); our guide to [test phone numbers by country](/blog/test-phone-numbers-by-country) shows a full OTP test flow.
- **Real checks free.** Every live account can check 100 phone numbers and 20 e-mail addresses for real, free, on the dashboard's **Try it** page. [Request access](/request-access) to open one.
- **Bulk too.** Clean an existing user base with a bulk job before a re-verification campaign: upload a CSV, get a free estimate, then run it. See [current prices](/pricing).
- **Prepay.** Top-ups of US$100 or more get a 5% bonus, US$500 or more 8%, and US$2,000 or more 10%.

WhatsApp is named descriptively; MobileValidate is not affiliated with WhatsApp, Meta, Google or Apple.

## What are the key takeaways?

- Code first, then brand, purpose, expiry and a never-share line. No links.
- Use at least six digits and expire codes within 10 minutes (NIST SP 800-63B-4).
- Keep it in one segment: 160 GSM-7 or 70 Unicode characters. One curly apostrophe made an 82-character message two segments in our test.
- Android SMS Retriever: under 140 bytes, include your 11-character app hash. iPhone and Chrome: last line `@yourdomain #code`.
- Say what you will never do ("we will never call you to ask for this code"), as the FTC tells consumers.
- Register sender IDs and templates where required: India (DLT), Spain (CNMC), Australia (Sender ID Register).
- WhatsApp authentication text is fixed; you choose only the button.
- Check line type and reachability before sending codes to risky sign-ups.

## Sources

1. [Verify a user's phone number: compute your app's hash string and construct a verification message (SMS Retriever API)](https://developers.google.com/identity/sms-retriever/verify) — Google for Developers, 2026
2. [Request one-time consent to read an SMS verification code (SMS User Consent API)](https://developers.google.com/identity/sms-retriever/user-consent/request) — Google for Developers, 2026
3. [Enabling AutoFill for domain-bound SMS codes](https://developer.apple.com/documentation/security/enabling-autofill-for-domain-bound-sms-codes) — Apple Developer Documentation, 2026
4. [Verify phone numbers on the web with the WebOTP API](https://developer.chrome.com/docs/identity/web-apis/web-otp) — Chrome for Developers, 2026
5. [Authentication templates](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates) — Meta for Developers, 2026
6. [NIST SP 800-63B-4: Digital Identity Guidelines, Authentication and Authenticator Management](https://pages.nist.gov/800-63-4/sp800-63b.html) — NIST, 2025
7. [Got a call about fraud activity on your bank account? It could be a scammer](https://consumer.ftc.gov/consumer-alerts/2024/06/got-call-about-fraud-activity-your-bank-account-it-could-be-scammer) — US Federal Trade Commission, 2024
8. [What's a verification code and why would someone ask me for it?](https://www.militaryconsumer.gov/blog/whats-verification-code-why-would-someone-ask-me-it) — US Federal Trade Commission (Military Consumer), 2024

## Frequently asked questions

### What should an OTP SMS say?

Put the code first, then who sent it, what it is for, how long it is valid, and a warning not to share it. For example: 482913 is your Acme login code. It expires in 10 minutes. Acme will never call or text you to ask for this code. That is 112 GSM-7 characters, one SMS segment.

### How long can an OTP SMS be?

One segment holds 160 characters in the GSM-7 alphabet or 70 in Unicode (UCS-2). A single character outside GSM-7, such as a curly apostrophe, an emoji or ó, switches the whole message to Unicode. Longer messages are split into parts of 153 or 67 characters, and each part is billed.

### What format does Android's SMS Retriever API need?

Google's documentation says the message must be no longer than 140 bytes, contain the one-time code, and include an 11-character hash string that identifies your app. Google's example puts the hash on its own line at the end. The SMS User Consent API needs no hash: the message must contain a 4 to 10 character alphanumeric code with at least one number.

### How do I make iPhone autofill a code only on my website?

Use a domain-bound code. Apple's documentation says the last line must be your domain prefixed with @, a space, and the code prefixed with #, for example @example.com #123456. It works from iOS 14 and macOS Big Sur. Chrome on Android uses the same format for the WebOTP API.

### Should an OTP SMS contain a link?

Keep links out of passcode messages. A code-only text gives a phisher nothing to copy, and telling users that your codes never contain links helps them spot fakes. Put links in other messages if you must, and use your own domain.

### What anti-phishing line should an OTP include?

Say what you will never do: Acme will never call or text you to ask for this code. The US FTC tells consumers that no bank representative will ever ask for a verification code and that anyone who asks is a scammer, so your message should say the same.

### Can I customize the WhatsApp authentication template text?

No. Meta's authentication templates use fixed preset text: <code> is your verification code, with an optional security line, For your security, do not share this code, and an optional expiry line. You choose the buttons (copy code, one-tap or zero-tap autofill), not the wording.

### Should I check a number before sending the OTP?

For risky sign-ups, yes. A line type and carrier lookup or a live network (HLR) check before sending shows VoIP, landline or unreachable numbers, so you can step up, choose another channel or refuse instead of paying for a code that won't arrive or that feeds SMS pumping.
