How to test a 2FA secret
- Find the setup key When a site shows the 2FA QR code, it usually offers “Can't scan? Enter this key”. Or paste the otpauth:// link a QR reader shows.
- Paste it here The current code appears with a countdown. Compare it with your authenticator app: they should match.
- Fix mismatches If codes differ, check your phone's clock is set automatically; TOTP depends on the time.
How TOTP codes work
A time-based one-time password (TOTP, RFC 6238) is made from two things: a shared secret and the current time. Every 30 seconds, the time is turned into a counter, the counter is signed with the secret using HMAC-SHA1, and six digits are taken from the result. Your phone and the website do the same sum independently, which is why codes match without any connection between them.
What can this tester read?
- Base32 setup keys, with or without spaces, like JBSW Y3DP EHPK 3PXP.
- otpauth:// links, including the issuer, account, algorithm (SHA-1, SHA-256, SHA-512), digits (6 or 8) and period.
Is it safe to paste a 2FA secret?
A TOTP secret is as sensitive as a password: anyone with it can make your codes. This page computes codes with the browser's Web Crypto API and sends nothing, but the safest habit is to test with a demo key, or with a secret you're about to set up or retire. Don't keep secrets in browser tabs or notes; keep them in an authenticator or password manager.
Codes don't match?
Almost always it's the clock: TOTP allows little drift. Turn on automatic date and time on your phone. Otherwise, check the secret was copied completely, and that the site doesn't use SHA-256 or 8 digits, which an otpauth link would state.
2FA code tester FAQ
Is my 2FA secret sent anywhere?
No. The code is computed in your browser with the Web Crypto API. Nothing is sent and nothing is stored.
What is a TOTP secret?
The shared key behind a 2FA QR code, usually shown as 16 or 32 letters and digits. With it, an app can produce the same codes as the website.
Why does my code not match my authenticator?
Usually the phone's clock is off. Set date and time to automatic. Also check the whole key was copied and the settings (digits, algorithm, period) match.
Can I use this as my authenticator?
It's a tester, not an authenticator: it doesn't save secrets. Use an authenticator app or a password manager with 2FA codes built in.
Does it support 8-digit or SHA-256 codes?
Yes, when the otpauth link specifies them: digits, algorithm and period are read from the link.
Keep it in Passbrick
Passbrick scans 2FA QR codes and shows live codes next to each login, so you don't need a separate authenticator app.