Standard (code first)
482913 is your OmniDemo verification code. It expires in 5 minutes. Never share this code with anyone.
GSM-7 · 102 characters · 1 SMS
Free tool
Build a verification code message that fits in one SMS, autofills on Android and iPhone, and matches Meta's WhatsApp authentication template. Includes segment counts, ready-to-send API code and a security checklist.
Free · no sign-up · runs in your browser
482913 is your OmniDemo verification code. It expires in 5 minutes. Never share this code with anyone.
GSM-7 · 102 characters · 1 SMS
OmniDemo: your code is 482913. Valid for 5 min. Don't share it.
GSM-7 · 63 characters · 1 SMS
482913 is your OmniDemo password reset code. It expires in 5 minutes. If you didn't request it, ignore this message.
GSM-7 · 116 characters · 1 SMS
Sources: Google SMS Retriever docs, WICG origin-bound one-time codes, Apple Password AutoFill docs, Meta authentication templates (checked 10 Oct 2026).
Need SMS, WhatsApp and voice OTP with automatic fallback and one bill? See OTP & notifications
Nothing you type here is sent to our servers.
Short answer
A good OTP SMS puts the code first, names the brand, states the expiry and warns the user never to share it, for example: "482913 is your Acme verification code. It expires in 5 minutes. Do not share it." Keep it to one segment (160 GSM-7 or 70 Unicode characters) and leave out links. For Android autofill, add your 11-character app hash. For iOS and web, end with "@yourdomain.com #482913".
Type your app or brand name, then pick a code length from 4 to 8 characters, digits only or letters and digits, and how many minutes the code stays valid.
Pick English, Arabic, French, Spanish, German or Portuguese, then SMS, WhatsApp or both. Arabic messages are counted as Unicode (70 characters per SMS).
Optionally paste your Android app's 11-character hash and your website domain. The tool builds the SMS Retriever, domain-bound and combined formats and checks the 140-byte limit.
Copy an SMS variant, the WhatsApp template JSON, or a cURL or Node.js request for our SMS API. Then work through the security checklist before you go live.
A verification message has one job: get the right code to the right person quickly, in a way that is hard to abuse. Most users read the code from the lock-screen notification, which shows only the first line or so. Put the code at or near the start, and make the brand clear so the user knows which service sent it.
Length matters for cost and reliability. A GSM-7 SMS holds 160 characters. Once a message is split, each part holds 153. A single character outside the GSM-7 alphabet, such as an Arabic letter, an emoji, a curly apostrophe or an accented letter like "ó" or "ç", switches the whole message to UCS-2. That drops the limit to 70 characters, or 67 per part. A two-part OTP costs twice as much and has a slightly higher chance that one part arrives late. The generator shows the encoding and segment count for every variant and can swap accented letters for plain ones so Spanish, Portuguese and French messages stay in GSM-7.
Google's SMS Retriever API lets an Android app read the verification SMS without the SMS permission and without the user typing anything. According to Google's documentation, the message must be no longer than 140 bytes, must contain the one-time code, and must include an 11-character hash string that identifies your app. That 140-byte limit equals 160 GSM-7 characters or 70 UCS-2 characters, so in practice the message has to fit in a single SMS.
The hash is the first 11 characters of a base64-encoded SHA-256 hash of your package name and signing certificate. Google's own example puts it on its own line at the end: "Your ExampleApp code is: 123ABC78", a blank line, then "FA+9qCX9VSu". Compute the hash from your production keystore and hard-code it on the server. Google says not to use hash strings computed dynamically on the client. Older versions of the documentation required the message to start with "<#>". The current page does not list that prefix. It does no harm, but it uses 4 characters. If you cannot control the message format, the SMS User Consent API is the alternative: the user taps once to let your app read that single message.
iOS and macOS detect codes in incoming SMS and suggest them above the keyboard when the field is marked as a one-time code field: textContentType = .oneTimeCode in a native app, or autocomplete="one-time-code" on an HTML input, as described in Apple's developer documentation. Since iOS 14 and macOS Big Sur, Safari also supports origin-bound one-time codes, a format defined in the WICG "Origin-bound one-time codes delivered via SMS" specification.
In that format the last line of the message is "@example.com #747723": the domain with an @ in front, then exactly one space, then the code with a # in front. An optional third value, "@embedded.example", names an embedded site. Human-readable text can come before the last line. Any other text between the values makes the line invalid. AutoFill then offers the code only on that domain or in apps associated with it, which makes it much harder to phish. The generator builds a combined message that carries the Android hash and the domain-bound last line and, for Latin-script languages, still fits in 140 bytes. In Arabic, send the Android and iOS formats separately.
WhatsApp requires an authentication template to send one-time passwords, and Meta fixes the body. In English it is "<code> is your verification code." You can add Meta's security line, "For your security, do not share this code.", and an expiry footer, "This code expires in <N> minutes.", where code_expiration_minutes is between 1 and 90. Each language version uses Meta's own fixed translation. URLs, media and emojis are not supported.
You choose the button. Copy code works everywhere. One-tap autofill opens your Android app with the code and needs your package name, signature hash and a handshake. Zero-tap (Android only) has no button: WhatsApp broadcasts the code straight to your app. On iOS 26 and later, keyboard suggestions offer the code from the notification with no integration. The code can be up to 15 characters and appears twice in the send request, as the body parameter and as the button parameter (sub_type "url"). Copy code button text is limited to 25 characters. Set message_send_ttl_seconds so stale codes are not delivered late. Meta also delivers authentication messages on Cloud API only to the user's primary device; linked devices see a masked prompt.
The message is the easy part. Most OTP fraud and cost overruns come from weak rules around it. These are widely used recommendations, not legal requirements. Adapt the numbers to your own risk.
Use a cascade for delivery. Try WhatsApp first where the user has it, fall back to SMS after a short timeout (for example 30 to 60 seconds without a delivery receipt), and offer a voice call that reads the code as a last resort for landlines and poor coverage. In the GCC, OTP is transactional traffic, so promotional rules such as the UAE "AD-" sender prefix do not apply. Your sender ID still has to be registered in most markets, so check local rules before launch.
Code first, brand, expiry and a do-not-share warning, in one segment and without links: "482913 is your Acme verification code. It expires in 5 minutes. Do not share it with anyone." Add an app hash line for Android autofill and "@yourdomain.com #482913" as the last line for iOS and web autofill.
Aim for one segment: 160 characters in GSM-7 or 70 in Unicode (for example Arabic). Google's SMS Retriever caps the message at 140 bytes, which works out to the same single-SMS limit. Longer messages are split into 153- or 67-character parts and billed per part.
No. Google's current SMS Retriever documentation requires three things: at most 140 bytes, the one-time code, and the 11-character app hash. The "<#>" prefix came from older guidance. Keeping it does no harm, but it costs 4 characters.
Mark the input as a one-time code field (textContentType .oneTimeCode in apps, autocomplete="one-time-code" on the web). iOS then suggests codes from Messages. To bind the code to your site, end the SMS with "@yourdomain.com #123456", with exactly one space between the two values.
No. Meta fixes the body ("<code> is your verification code.") and translates it per language. You can only add the optional security line, an expiry footer of 1 to 90 minutes, and choose a copy code, one-tap or zero-tap button. URLs, media and emojis are not allowed.
Use both. WhatsApp offers copy-code and one-tap autofill buttons and shows your verified business name. SMS reaches every phone, with or without data. A common setup tries WhatsApp first, falls back to SMS after 30 to 60 seconds without delivery, and offers a voice call as a last resort.
Arabic text uses UCS-2 encoding, which allows only 70 characters in a single SMS and 67 per part once it is split. Keep the Arabic wording short, use Western digits for the code, and check the count in the generator before you send.
It's best avoided. Links in verification messages make phishing easier, carriers filter them more often, and they teach users to tap links in SMS. Send the code only, and let the user type it or autofill it in your app.
Your privacy choices
Cookie noticeWe use only what this site needs to work. With your permission, we also remember how you found us (the referring website and campaign link) so our team knows which content helped. No advertising or third-party cookies. Cookie notice