TOTP / 2FA Code
Generate and verify TOTP codes from a secret or an otpauth URI.
- Input and output stay in memory and are gone when you leave this page.
Nothing saved
Input and output stay in memory and are gone when you leave this page. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Secret
Verify code (±1 step window)
TOTP code
—
What this tool does
Computes the RFC 6238 time-based one-time password (TOTP) for a Base32 secret, counts down to the next time step, verifies a user-typed code against a ±1 step window, and reads or writes the otpauth://totp/... URI that authenticator apps exchange.
How it runs
Runs on the main thread using hmacBytes over an 8-byte big-endian step counter, RFC 4226 §5.4 dynamic truncation, decodeBase32, encodeBase32, and randomBytes. Google Authenticator ignores the algorithm parameter and computes SHA-1 regardless.
Limits and non-goals
No QR code, in either direction. There is no QR encoder or decoder anywhere in this product's registry, so the tool exchanges otpauth:// URIs as text and says so rather than pretending. TOTP only: HOTP is parsed far enough to be rejected by name. It is not an authenticator app: nothing is stored, and closing the tab loses the secret. Verification is local arithmetic and proves the code matches the secret you pasted; it proves nothing about a remote server's clock.
Example
Secret JBSWY3DPEHPK3PXP, SHA-1, 6 digits, 30 s produces Counter 58234871, a progress bar at 19 seconds remaining, and otpauth://totp/DevStash:alice?secret=JBSWY3DPEHPK3PXP&issuer=DevStash&algorithm=SHA1&digits=6&period=30.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.