Base32 secret in, live 6-digit code out, 30s countdown and next code, SHA1/256/512, 100% in-browser, RFC 6238
- Runs locally
- Category Developer & DevOps
- Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
------------What this tool does
Free online TOTP generator. Paste a Base32 secret (the same kind a site shows next to its QR code when you set up two-factor auth) and this tool computes the live 6-digit time-based one-time password, the seconds left in the current 30-second window, and the code that comes next. It is the exact algorithm Google Authenticator, Authy and 1Password run, RFC 6238 with HMAC-SHA1 over the floored Unix time counter, computed locally through the native WebCrypto `crypto.subtle` API. Nothing is uploaded, nothing is logged, and the secret is never written into the shareable URL. Use it to confirm a freshly scanned secret produces the same code your phone shows before you trust it, to log in when your phone is flat, or to debug a 2FA integration where codes keep getting rejected. Algorithm, digit count and period are all adjustable, so you can match an 8-digit or SHA-256 setup as well as the default 6-digit SHA-1 one. Keep production secrets on a dedicated device, this page is for testing and recovery, not for storing live keys.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Developer & DevOps · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How TOTP Generator fits into your work
Use it in the small gaps between coding, reviewing, debugging, and shipping.
Developer jobs
- Formatting, validating, shrinking, or inspecting code-adjacent text.
- Preparing snippets for documentation, tickets, commits, or handoff.
- Checking a small payload quickly without switching tools.
Developer checks
- Run irreversible transforms like minify or obfuscate on a copy.
- Keep secrets out of pasted snippets unless the tool explicitly stays local.
- Use your normal tests or linter before shipping transformed code.
Good next steps
These links move the current task into a more complete workflow.
- 1 HMAC Generator HMAC-SHA1/256/384/512 — message + secret key, output in hex and base64, key read as UTF-8/hex/base64 — 100% in-browser Open
- 2 JWT Decoder Decode JWT header / payload / signature — verify structure, check exp, copy claims — browser-only Open
- 3 Bcrypt Generator bcrypt password hash generator + verifier — pick rounds, hash and compare in browser. Open
Real-world use cases
Verify a freshly scanned secret before you trust it
You just enabled 2FA on a site and it showed both a QR code and a Base32 string. Before you click "I have saved my codes", paste that string here and check the live 6-digit code matches what your authenticator app shows in the same second. If they tick together, you know the secret transferred correctly and you will not lock yourself out at the next login.
Log in when your phone is dead or lost
Your authenticator lives on a phone with no battery, but you saved the Base32 backup secret in your password manager. Paste it here on a computer you trust and read off the current code to get into the account, then immediately reset 2FA to a working device. It is the recovery path the QR code was always capable of, just without the phone in hand.
Debug a 2FA integration that keeps rejecting codes
You are wiring TOTP into a backend and the server rejects every code your test phone produces. Paste the shared secret here, set digits and algorithm to match your library config, and compare the code, the counter and the seconds remaining against what your code computes. Mismatches almost always trace to clock skew, a wrong period, or a secret decoded as the wrong encoding.
Teach how time-based one-time passwords work
Explaining 2FA in a security class or onboarding doc lands better with a live demo. Put a fixed test secret on screen, show the code regenerating every 30 seconds, switch digits from 6 to 8, and flip the algorithm to SHA-256 so learners see the parameters change the output. The countdown bar makes the time-window concept concrete.
Common pitfalls
Retyping the secret by hand and turning O into 0 or I into 1. Base32 has no 0, 1, 8 or 9, so a typo produces either an invalid-Base32 error or, worse, a valid-but-wrong secret that yields codes your phone never agrees with. Copy the string straight from the setup screen.
Leaving digits at 6 and algorithm at SHA-1 when the site actually uses 8 digits or SHA-256. The parameters must match the issuer exactly or the code will be wrong even with the right secret. Check the otpauth URI behind the QR code for the digits, period and algorithm fields.
Pasting a real production secret into a web page. Even a local-only tool runs inside a browser that extensions and onlookers can observe. Use a throwaway test secret here and keep live 2FA secrets in a dedicated authenticator app or hardware key.
Privacy
Every step runs in your browser tab: the Base32 decode, the HMAC-SHA1 over the time counter through the native WebCrypto API, the truncation to digits, and the countdown. The secret and the generated code never leave the page, are never uploaded, and are never logged. The secret is deliberately kept out of the shareable URL, only the non-sensitive digits, period and algorithm options round-trip in the link, so a shared URL can never leak your key. Even so, treat any browser as untrusted for live secrets: use a throwaway test secret here and keep production 2FA keys on a dedicated authenticator.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only