Verification Code SMS Templates (OTP & 2FA)
Templates for one-time passcodes, sign-up confirmations and security alerts. Each is short enough for a single SMS and written to discourage code-sharing scams.
Best practices for OTP text messages
- Name your app or company so the user knows who sent the code.
- Say “do not share”. Phishing scams often ask victims to read out their code.
- State how long the code is valid (5–10 minutes is common) and generate codes with a cryptographically secure random generator.
- Do not put links in OTP messages: users learn to trust links in codes, which scammers exploit.
- Keep it in GSM-7 (no emoji or curly apostrophes) so it fits in one segment: check with the SMS character counter.
Autofill: the “@domain #code” line
Safari on iPhone/Mac and Chrome on Android support origin-bound one-time codes. If the last line of the SMS is @example.com #482913 (your site's domain, a space, then # and the code), the browser offers to fill the code only on that website. That makes autofill easier for users and helps block phishing sites. On your sign-in form, add autocomplete="one-time-code" to the code field.
Login & sign-up codes
Basic one-time code
Your [App] verification code is 482913. It expires in 10 minutes. Do not share this code with anyone.
Code with web-autofill line
Your [App] code is 482913. Don't share it with anyone.
@example.com #482913
Sign-up confirmation
Welcome to [App]! Enter 482913 to confirm your phone number. If you didn't sign up, ignore this message.
Short code, very compact
482913 is your [App] code. Never share it.
Security alerts
Password reset
[App]: Use 482913 to reset your password. If you didn't request this, ignore this text and your password stays the same.
New device sign-in
[App]: New sign-in to your account from [Device/City]. Not you? Reset your password at [link].
Payment confirmation code
[Bank]: Code 482913 to approve a payment of $49.00 to [Merchant]. We will never call you to ask for this code.
Phone number changed
[App]: The phone number on your account was changed. If you didn't do this, contact us at [link] right away.