Authentication & Identity
TOTP and 2FA tester
Calculate a time-based one-time code locally from a secret or authenticator QR.
TOTP and 2FA tester
This only calculates a code locally; it does not verify that a service accepts it.
Paste a Base32 secret or an otpauth://totp URI. Do not include an account password.
Current one-time code
Seconds remaining:
Inspect a QR code with this device camera
QR inspection uses your device camera in this browser when supported. The camera image and decoded authenticator data are not sent or saved by this page.
What is a TOTP code tester?
A TOTP (Time-Based One-Time Password) tester calculates temporary RFC 6238 authentication codes from a shared Base32 secret and the current time. It helps developers and users verify 2FA setups and diagnose clock-drift issues locally.
How to test a TOTP secret or QR code
- Paste a Base32 secret key or full otpauth://totp/... URI (or optionally scan a QR code locally with your device camera).
- Confirm the hash algorithm (default SHA-1), digit length (default 6), and period (default 30 seconds).
- Read the live generated code and countdown timer calculated directly in your browser.
- Compare the output against your authenticator app or server implementation, then close the tab to clear page state.
How RFC 6238 TOTP generation works
- Decodes your Base32 secret locally and computes HMAC-SHA1/256/512 over the current 30-second Unix time step.
- Applies RFC 6238 dynamic truncation to produce a 6-to-10-digit numeric code.
- Runs entirely in your browser with connect-src 'none' — secrets and camera frames never leave your device.
Security warnings & clock synchronization
- Treat any TOTP secret or otpauth:// URI like a password — anyone who copies the seed can generate valid 2FA codes.
- If codes do not match your service, check that your device clock is automatically synchronized via NTP (even a 30-second drift causes rejections).
- This tool calculates codes locally; it cannot verify whether an external website accepts the code.
Frequently asked questions
Is my TOTP secret saved or sent anywhere?
No. Your secret stays strictly in page memory, is never written to browser storage, and is cleared automatically when you leave or close the tab.
Why does my TOTP code differ from my phone's authenticator app?
The two most common causes are device clock drift (enable automatic network time) or mismatched parameters (SHA-256 vs SHA-1, 8 digits vs 6 digits, or a 60-second period).
Does camera QR scanning upload my video feed?
No. Camera access uses your browser's local media stream strictly to decode the QR code on-device; no frames are uploaded or saved.
Related free security tools
- Open tool
Password and passphrase generator
Create high-entropy random passwords and memorable EFF Diceware passphrases locally with WebCrypto randomness.
- Open tool
Password strength checker
Estimate password entropy in bits and spot common patterns, dictionary words, and length weaknesses locally.
- Open tool
Password leak checker
Check if a password was exposed in known data breaches using 5-character SHA-1 k-anonymity range lookup.
- Open tool
URL and domain lookalike inspector
Compare any URL against a reference domain to detect Unicode homoglyphs, mixed scripts, and typosquatting.
Your TOTP secret and generated code are used only in this page. They are not sent to a server or written to browser storage. Closing or leaving clears page state; a web page cannot guarantee secure erasure from device memory. QR inspection uses your device camera in this browser when supported. The camera image and decoded authenticator data are not sent or saved by this page.
This site has no analytics or error tracking. Tool inputs are never placed in this site’s URLs.
Store 2FA authenticator codes inside your encrypted vault
Lockera generates live TOTP codes right alongside your logins and syncs them end-to-end encrypted across your devices.
Opens a blank Lockera login form. Nothing from this page is attached; enter only what you choose to save.