What is an OTP? Meaning, types, and security
By SV Number Editorial Team
A one-time password (OTP) is a temporary, single-use credential used to verify a login, account action, or transaction.
In this 2026 guide, treat a six-digit code as a common example, not a universal format. MDN's OTP documentation notes that many OTPs have six digits, while length and expiration depend on the implementation. A time-based one-time password commonly changes every 30 seconds, although RFC 6238 defines a configurable time-based algorithm rather than a universal 30-second rule for every OTP.
The method matters. HOTP, TOTP, and SMS OTP have different security limits, failure modes, and recovery requirements.
What does OTP mean?
OTP means one-time password. An OTP is a generated credential that protects one login attempt, account action, or transaction and becomes invalid after successful use or expiration. Unlike a static password, it is not intended for repeated use. A login OTP is simply an OTP used during sign-in, either alone in a supported passwordless flow or as an additional factor.

The MDN overview describes email OTP, SMS OTP, and time-based one-time passwords as three common implementations. The visible code may look similar in each case, but its generation method, delivery exposure, and recovery requirements can differ substantially.
An OTP usually proves control of something the user has, such as a phone, email account, authenticator app, software token, or hardware token. A static password instead relies on knowledge of a reusable secret. Biometric authentication uses a characteristic such as a fingerprint, although a biometric may also serve as a local unlock gesture within a broader authentication system.
OTP authentication can support two-factor authentication when it follows a password or another distinct factor. It can also form part of a broader multi-factor authentication policy. Some services use a delivered OTP without a conventional password, but that design does not create the same assurance as a flow containing two independent factors.
Adding an OTP does not automatically make a login flow phishing-resistant. Yubico's OTP analysis explains that a conventional code verifies its own value rather than the context in which it is entered. An attacker may still persuade a user to type a valid code into a fraudulent page and relay it immediately.
How does OTP authentication work?
OTP authentication works by checking a short-lived credential that the legitimate user should be able to receive or generate. The service either creates a code and delivers it through a separate channel, or independently derives the same code as the user's authenticator. After verification, a correctly implemented service invalidates the accepted OTP so it cannot authorize another attempt.
A typical flow contains five stages, building on the generation, delivery, use, verification, and expiration process in Tools4ever's OTP explanation:
- Request: The user starts a login, registration, password reset, new-device check, or sensitive account action.
- Generation or derivation: The service generates a code, or the service and the user's authenticator independently calculate matching values from a shared secret and a moving factor.
- Delivery or display: The service sends the OTP through an available channel, or an authenticator app, software token, or hardware token displays it.
- Verification: The user enters the OTP before it expires. The service checks the value, its validity conditions, and whether it has already been accepted.
- Invalidation: Successful verification ends the code's useful life. Expiration also prevents later use, subject to the service's implementation.
Generation and delivery are separate jobs. An SMS OTP normally requires the service to transmit a newly generated code. A TOTP authenticator does not receive each new code. As MDN's TOTP section explains, the website and user generate the same code independently from the current time and a shared secret.

Single-use validation matters as much as code generation. If a service accepts the same OTP repeatedly, calling it one-time does not provide replay protection. Verification also needs an appropriate validity period, attempt controls, and a way to associate the challenge with the correct user and action.
What are the main types of OTP?
The main OTP types are HMAC-based one-time passwords, time-based one-time passwords, and service-generated codes delivered through a separate channel. HOTP uses an event counter, TOTP uses a time-derived value, and service-generated OTP uses a code created by the service before delivery through a channel such as SMS or email.

HOTP and TOTP are related rather than competing delivery channels. RFC 4226 describes HOTP as work produced through OATH, the Initiative for Open Authentication. RFC 6238 then extends the HOTP construction by replacing its counter with a time-derived value. Service-generated OTP is a useful operational category, but it is not a third version of the same standardized moving-factor algorithm.
Table 1. HOTP, TOTP, and service-generated OTP compared
| OTP type | Moving factor or generation method | How the user obtains the code | Typical validity behavior | Main operational concern |
|---|---|---|---|---|
| HMAC-based one-time password | Shared secret and event counter | Authenticator, software token, or hardware token | Controlled by counter validation and service policy | Counter synchronization |
| Time-based one-time password | Shared secret and time-derived value | Authenticator app or compatible token | Changes after each configured time step | Device time and secret protection |
| Service-generated OTP | Value generated by the service | SMS, email, voice call, or push notification where supported | Expires according to service policy and accepted use | Delivery, interception, and recovery |
HMAC-based one-time password
An HMAC-based one-time password uses a shared secret and an event counter. HMAC means hash-based message authentication code. The user's token and authentication service apply the algorithm to the same secret and counter material, allowing the service to validate the resulting value.
HOTP is event-based rather than clock-based. An unused code does not become invalid merely because 30 seconds have passed, although a service may apply additional policy. The token and service must also maintain compatible counter state. Generating values without successfully using them can create synchronization problems that require recovery or resynchronization.
IETF RFC 4226, published in December 2005, defines the HOTP algorithm. Its contents include validation, server throttling, counter resynchronization, and management of shared secrets. Those operational sections show why implementing HOTP involves more than calculating a number.

Time-based one-time password
A time-based one-time password uses a shared secret and a time-derived value instead of an event counter. The authenticator and service independently calculate the current value. No new SMS or email message is required each time the displayed code changes.
Thirty seconds is a common TOTP interval, not a universal OTP requirement. Yubico's glossary describes Google Authenticator and Microsoft Authenticator as authenticator apps using the TOTP model and gives 30 or 60 seconds as typical code-refresh intervals. The applicable configuration comes from the enrolled service, not from the abbreviation OTP itself.
During enrollment, MDN's TOTP explanation describes the user installing an authenticator app and the service generating and securely storing the shared secret. The authenticator and service can then independently calculate matching values from the current time and shared secret.
Anyone who obtains the necessary secret material may be able to generate matching values. Enrollment records, exports, and backups therefore need protection comparable to other authentication secrets.

Service-generated one-time passwords
A service-generated one-time password is created by the service and sent through a separate channel. Its defining feature is delivery of a generated value, not a standardized counter or time step shared with an authenticator.
MDN's delivery discussion describes website-generated codes delivered by email or SMS. Email OTP may contain a numeric code or a personalized one-time link. A code offers more flexibility about where the user completes login, while a link can require the same browser or device and introduces additional phishing concerns.
Other delivery options depend on the service. Twilio's OTP explainer describes email, text, and phone-call choices in its example user flow. Push-based verification also exists, but a push approval should not be treated as interchangeable with an OTP unless the service's actual interaction is understood.
Delivery reliability and account recovery become part of the security design. A user who loses access to the registered phone number, inbox, or enrolled device may be unable to complete authentication even when the code generator is operating correctly.

How are OTPs delivered?
OTPs are delivered through SMS, email, voice calls, or push notifications, while authenticator apps, software tokens, and hardware tokens can display locally generated values. SMS OTP and email OTP normally transmit a service-generated code. HOTP and TOTP tokens instead calculate codes from enrolled material, producing different connectivity and recovery requirements.

Table 2. OTP delivery and display methods compared
| OTP method | What the user needs | Connectivity needed to obtain the code | Principal exposure or limitation |
|---|---|---|---|
| SMS OTP | Access to the registered phone number and active SIM card or eSIM | Mobile network service | SIM swapping, SS7 weaknesses, number recycling, filtering, and signal problems |
| Email OTP | Access to the registered inbox | Internet access and functioning email delivery | Email compromise, delay, spam filtering, and phishing links |
| Voice call OTP | Ability to answer the registered number | Available telephone service | Call handling, voicemail, forwarding, and availability problems |
| Push notification OTP | Enrolled device and the service's app | Usually internet access | Malicious prompts, device loss, and notification fatigue |
| Authenticator app TOTP | Enrolled compatible device | Usually no connection for each code | Device loss, exposed shared secret, and relay of typed codes |
| Software token HOTP or TOTP | Installed token software and enrolled secret | Usually no connection for each code | Endpoint compromise, backup, and device replacement |
| Hardware token OTP | Physical token enrolled with the service | Usually no network connection for code display | Loss, damage, replacement, and relay of conventional typed codes |
An authenticator app avoids SMS routing and carrier-related delivery exposure because each TOTP is calculated locally. That does not protect a user who types the resulting value into a fake login page. The code still lacks awareness of which website requested it.
A hardware token can also reduce dependence on a phone or inbox without making every use of its output phishing-resistant. The generation device and the authentication protocol are separate considerations. Choose with both in mind.
What can OTPs be used for?
OTPs can verify registration, login, password reset, new-device sign-in, transaction approval, and sensitive account changes. A login OTP checks sign-in, while other OTP flows confirm a specific action. Websites choose their own delivery methods and acceptance rules, so an option available on one service does not imply identical support elsewhere.

LoginRadius's OTP glossary identifies two-factor authentication, transaction authorization, password reset, and new-device login as common use cases. In practical terms, those uses fall into several groups:
- Account registration: Confirming control of an email address or phone number during sign-up.
- Two-factor authentication: Adding a possession-based check after a static password.
- Passwordless authentication: Letting a user sign in with a delivered credential where the service supports that model.
- Password reset: Checking access to a recovery channel before permitting a new password.
- New-device sign-in: Adding scrutiny when a browser, device, or location is unfamiliar.
- Sensitive account changes: Confirming changes to recovery details or similarly consequential settings.
- Transaction confirmation: Asking the user to approve a particular operation rather than merely establish a session.
An OTP is a verification step, not proof that every request is legitimate. Users should still inspect the website, requested action, and any displayed transaction details before entering or approving a code. A valid OTP entered in response to a fraudulent request can still authorize the attacker's intended action.
What are the benefits of OTP authentication?
OTP authentication limits the reuse value of a captured credential, supports two-factor and multi-factor authentication, and provides a recognizable verification process. A successfully used OTP should not authorize another attempt, and expiration limits its useful lifetime. These properties improve on a static password alone without making OTP universally secure or phishing-resistant.

The Wikipedia OTP overview explains the replay distinction directly: an intruder who records an OTP that has already been used cannot use that same value again because it is no longer valid. This is a narrower benefit than claiming that OTPs prevent phishing. A live, unused code may still be captured and relayed before expiration.
In practice, OTP authentication offers several benefits:
- Reduced replay value: A replay attack using an already accepted OTP should fail when single-use validation is implemented correctly.
- Less reliance on password secrecy alone: An attacker who obtains a static password may still need access to the user's phone, inbox, authenticator, or token.
- Reduced value of reused credentials: A password exposed through credential stuffing does not itself provide the current OTP for the target account.
- Flexible deployment: Services can request an OTP at every login or reserve it for registration, recovery, unfamiliar devices, and higher-risk actions.
- Local generation: HOTP and TOTP tokens can produce codes without receiving a new message for each attempt.
Tools4ever's overview also describes one-time codes as established and familiar technology. Familiarity can reduce friction, but it does not compensate for weak recovery, unlimited guesses, exposed secrets, or real-time phishing. Benefits depend on the complete implementation.
What are the security risks of OTPs?
OTP security risks include real-time phishing, man-in-the-middle relay, credential theft, device loss, and compromise of the receiving account. SMS OTP adds SIM swapping, SS7, number recycling, and connectivity risks. Authenticator apps remove SMS-specific delivery exposure, but a typed authenticator code can still be captured and relayed.
Real-time phishing works because a conventional OTP does not authenticate the login context. An attacker operates a fake page, collects the static password and current OTP, and relays them to the genuine service before the code expires. This man-in-the-middle attack can affect SMS OTP, email OTP, and authenticator-generated codes.
Yubico's real-time phishing analysis states that moving generation to an app or secure device does not remove this protocol limitation. The attacker can intercept a valid value as the user enters it on a fraudulent site and immediately relay it. Generation security and login-context verification answer different questions.

MDN's SMS OTP section identifies several delivery-specific weaknesses:
- SIM swapping: An attacker abuses mobile number portability or related carrier processes to impersonate the victim and gain control of the number.
- SS7 weaknesses: Flaws in telephone signaling can permit redirection or interception of messages.
- Number recycling: A carrier may assign a closed account's former phone number to another customer.
- Device and travel changes: A different SIM card, eSIM, disabled service, or unsuitable travel configuration can prevent receipt.
- Message interception: An attacker with suitable access to the receiving environment may obtain the code.
Current NIST SP 800-63B guidance distinguishes authentication assurance and phishing-resistant authenticator requirements. Selecting an OTP channel or moving code generation into an app does not by itself establish that the complete authentication system is phishing-resistant.
Email OTP shifts much of the delivery risk to the inbox. If an attacker controls both the static password and the email account, the second step may provide little independent protection. Email links also train users to click authentication links, which MDN identifies as a phishing concern.
Hardware tokens avoid some remote delivery risks but can be lost, damaged, or stolen. Their conventional typed OTP output remains exposed to real-time relay. Assess these risks separately: interception of delivery, theft of the device, compromise of enrollment secrets, and phishing of the login session.
How do OTP methods compare?
OTP methods trade convenience against interception exposure, phishing resistance, device dependence, recovery, and operational cost. SMS OTP is familiar but carrier-dependent, authenticator apps avoid SMS routing, and hardware tokens add physical possession. Correctly implemented passkeys using FIDO2 and WebAuthn provide a different, origin-scoped authentication model.

Table 3. Security and selection tradeoffs for OTP and passkey methods
| Method | Convenience | Delivery or interception exposure | Protection against real-time relay of typed codes | Recovery and cost considerations |
|---|---|---|---|---|
| SMS OTP | High familiarity and little setup | SMS routing, SIM swapping, number recycling, and signal dependence | Not provided by the typed OTP alone | Delivery failures, recovery, and support |
| Email OTP | Accessible from signed-in devices | Inbox compromise, filtering, and delay | Not provided by the typed OTP alone | Inbox recovery and email delivery operations |
| Authenticator app TOTP | Quick local generation after enrollment | No SMS delivery for each code; secret and device remain sensitive | Not provided by the typed OTP alone | Device replacement, enrollment backup, and support |
| Hardware token OTP | No phone app required for supported flows | Physical loss or theft rather than SMS routing | Not provided by a conventional typed OTP | Token purchase, inventory, distribution, and replacement |
| Passkeys with WebAuthn | Device unlock can replace typed codes | Origin-scoped public-key credentials reduce reliance on shared typed secrets | Phishing-resistant when correctly implemented | Platform support, synchronization or backup, and recovery design |
The W3C Web Authentication specification defines public-key credentials scoped to a relying party. A credential created for one origin is not simply a reusable secret that the user types into any requesting page. That origin binding addresses the central weakness behind conventional OTP relay attacks.
FIDO Alliance passkey guidance describes passkeys as FIDO credentials that can be stored on a phone, computer, or hardware security key. A user may approve sign-in with the same biometric, PIN, or pattern used to unlock the device. Fingerprint authentication can therefore unlock a local credential without requiring the website to receive the user's fingerprint.
Recovery paths, fallback methods, device synchronization, and implementation errors can weaken an otherwise strong authentication design. Calling an entire deployment phishing-resistant requires examining those components rather than relying on the product label.
Why is my OTP not arriving?
An OTP may not arrive because it expired, delivery was delayed, the registered details are wrong, a filter blocked it, or the receiving device lacks connectivity. SIM changes and sender-side delivery problems can also disrupt verification. Check the latest code and delivery channel before requesting another OTP or starting account recovery.

Work through these checks in order:
- Check the registered destination. Confirm the phone number, country code, email address, and relevant inbox. For email, inspect spam or junk filtering.
- Check connectivity. Look for mobile signal, disabled SMS service, airplane mode, internet problems, or a changed SIM card or eSIM.
- Check which request you made. If you requested several codes, follow the service's instructions about which one is valid rather than assuming every code remains usable.
- Allow a reasonable delivery interval. Delivery queues, filtering, and network conditions can delay a message. MDN specifically identifies latency between sending and receiving as a usability problem for SMS and email OTP.
- Avoid rapid repeated requests. Follow the service's displayed resend guidance rather than assuming that every requested code remains usable. For broader verifier requirements and recommendations, consult current NIST SP 800-63B guidance.
- Check expiration. Request a fresh code when the displayed validity period has passed instead of repeatedly submitting an expired value.
- Stop after repeated failures. If the service reports restricted attempts or account lockout, further guessing is not a recovery method.
- Use the official recovery path. If the number, inbox, authenticator, or token is no longer available, message troubleshooting alone cannot restore possession of that channel.
For service operators, missing OTPs are also a support and cost issue. Yubico's operational discussion identifies account lockouts and lost devices as sources of helpdesk overhead. Delivery failures, recovery, and lockouts should be measured as part of the authentication system rather than treated as isolated user errors.
How do you implement OTP authentication?
Implement OTP authentication with a documented generation method, single-use validation, expiration, rate limiting, anti-replay controls, protected secrets, and tested recovery. Protect enrollment as carefully as verification. Accessible code entry, clear errors, useful audit records, and restrained retry behavior complete the basic control set.

For HOTP and TOTP, follow RFC 4226 or RFC 6238 rather than inventing a custom cryptographic construction. For service-generated OTP, use a suitable generation process and avoid predictable values. Code length is only one control: unrestricted verification attempts can undermine an otherwise reasonable code format.
A sound implementation should:
- Bind each challenge to the correct user, action, and authentication attempt.
- Reject an OTP after successful use and after its configured expiration.
- Limit verification attempts and challenge requests without creating an easy denial-of-service path.
- Protect shared secrets during enrollment, storage, backup, and recovery.
- Record security-relevant events without logging usable OTP values or secret keys.
- Provide recovery that does not quietly bypass every additional factor.
- Make errors useful without revealing sensitive account information.
- Test device loss, destination changes, clock problems, and resynchronization before relying on the system.
Current NIST SP 800-63B guidance defines verifier responsibilities and authentication assurance levels. Its requirements vary by assurance level and deployment. NIST also states that AAL2 applications must offer a phishing-resistant option, while AAL3 requires a phishing-resistant authenticator with a non-exportable authentication key. A generic six-digit form is not a complete assurance or compliance design.
For web forms, make code entry easier with the right input attributes. MDN's example uses the following attributes for a six-digit implementation:
<input
required
type="text"
autocomplete="one-time-code"
inputmode="numeric"
maxlength="6"
pattern="\d{6}" />
The autocomplete="one-time-code" attribute identifies the field's purpose, while inputmode="numeric" requests a suitable virtual keyboard. Neither attribute validates the OTP by itself. Server-side verification remains necessary.
For compatible SMS autofill, MDN's origin-bound code and WebOTP guidance describes a standardized message format containing the origin and code. The browser can offer the code when the message origin matches the login form's origin. This association can also reduce the chance of suggesting the code on an unrelated site.
The WebOTP API offers programmatic access to supported SMS codes, but MDN states that it does not have good cross-browser support. Unless programmatic access is necessary, the standardized message format and autocomplete="one-time-code" are the more broadly appropriate starting point. Test actual target browsers rather than assuming uniform behavior.

Which OTP authentication method should you choose?
Choose an OTP method by account sensitivity, phishing exposure, user devices, accessibility, delivery reliability, recovery, and support capacity. No method is best for every organization. Treat "better than no additional factor" and "phishing-resistant" as different claims, and assess enrollment and recovery alongside the code-generation mechanism.
Start with five questions:
- What is being protected? Higher-value accounts and sensitive administrative actions justify stronger protection and more careful recovery than low-risk trials.
- Can users still be fooled into typing a code? If real-time relay is a material risk, evaluate correctly implemented WebAuthn or passkeys rather than assuming that an authenticator app solves it.
- What can users reliably access? SMS depends on the registered number and mobile service. Authenticator and hardware methods depend on enrollment, device availability, and replacement processes.
- How will recovery work? Recovery should restore legitimate access without becoming an easier route around every additional factor.
- What will the system cost to operate? Include failed delivery, lockouts, device replacement, support, accessibility, and audit needs rather than comparing only the visible login step.
For SMS specifically, MDN advises against using SMS OTP on its own to establish new sessions or for general authentication. Its narrower recommendation is to use it, if at all, as a second factor or to confirm intentions. This is different from saying that SMS provides no value in any context.
For higher assurance, use the NIST guidance discussed above to determine the required level and available phishing-resistant options. Do not infer compliance merely from selecting a particular app, token, or passkey label. Assurance depends on the complete enrollment, authentication, and recovery system.
Document the fallback too. A secure primary method paired with an uncontrolled email or support-desk bypass may leave the overall account exposed. Test whether legitimate users can recover and whether an attacker can exploit the same path.
Can you receive an SMS OTP without using your personal number?
A rented number can receive an SMS OTP, but acceptance depends on the website or app. A number suitable for one service may not be accepted by another. Check the service's rules before paying, and do not treat rental as guaranteed delivery, universal acceptance, or a way to bypass a platform's restrictions.
SV Number publishes this guide and operates the service described in this section.
SV Number offers a paid phone number rental for 20 minutes for one-time SMS verification. During the rental, the number is exclusive to the customer and is not resold for the same service. The service receives incoming SMS only. It does not support calls, incoming or outgoing, and it does not send messages.
There is no app or subscription for this one-time verification path. Pricing is pay-as-you-go, and a free replacement or refund applies if the paid activation code does not arrive. For that specific task, you can rent a phone number for 20 minutes.
Do not use this offer for banking or government website verification. It is also unsuitable when you need calls, ongoing two-way messaging, or a number for ordinary long-term communication. For those needs, choose a second-number app designed for calls and messaging instead.
Frequently asked questions about OTPs
Is an OTP the same as two-factor authentication?
No. An OTP is a credential, while two-factor authentication requires proof through two distinct authentication factors. An OTP can supply one factor after a static password, but a delivered OTP used alone is not automatically two-factor authentication.
Is SMS OTP safe?
SMS OTP can add a useful check beyond a static password, but it has carrier, interception, availability, and real-time phishing limitations. It is not phishing-resistant. For higher-value accounts, compare it with origin-bound, phishing-resistant methods and assess recovery as well as delivery.
How long does an OTP last?
The service determines the validity period. A TOTP commonly changes every 30 seconds, while a delivered code may use a different expiration window. Successful use should also invalidate the accepted value. Follow the validity information shown by the service rather than applying one duration to every OTP.
What is a login OTP?
A login OTP is a one-time password used specifically during sign-in. It may be delivered to a registered destination or generated by an enrolled authenticator. Other OTP flows can protect registration, recovery, or a sensitive action rather than the initial login.
Should I share an OTP with support staff?
No. Treat an OTP as an authentication secret. NIST guidance places responsibility on subscribers to protect authentication secrets and not disclose them. Use the service's official support or recovery process instead of reading a current code to someone who requests it.
What does OTP mean in texting or fandom?
In texting and fandom, OTP can also mean "one true pairing," a favorite fictional couple, while this guide uses OTP only to mean one-time password in authentication.
No single OTP method fits every account. Match the method to the account, threat, device, and recovery requirements. For a separate one-time SMS registration task, SV Number provides a way to receive SMS verification codes, subject to website acceptance and the limitations above. For high-value account protection, use the phishing-resistant method comparison rather than treating an SMS code as the strongest option.