Security & Cryptography
TOTP 2FA Code Generator
Generate time-based one-time passcodes from a Base32 secret.
Free foreverRuns in your browserNo sign-up
Generates time-based one-time passwords (TOTP, RFC 6238) like an authenticator app, using HMAC-SHA1. Everything runs in your browser and the secret is never uploaded.
About the TOTP 2FA Code Generator
Generate time-based one-time passcodes (TOTP) from a Base32 secret, just like an authenticator app.
The code refreshes every period and a countdown shows how long it is valid, so you can read or copy it in time.
Everything runs in your browser using HMAC-SHA1, so your secret is never uploaded.
Key features
- Live TOTP codes with a countdown
- 6 or 8 digits, 30 or 60 second periods
- Standard RFC 6238 algorithm
- Runs entirely in your browser
How to use
- 1Paste your Base32 secret key.
- 2Choose the digits and period if needed.
- 3Read or copy the current code before it refreshes.
Examples
Generate a code
Input:
Base32 secretOutput:
A 6-digit code with a countdownThe code matches what an authenticator app would show.
Longer codes
Input:
8 digits, 60 secondsOutput:
An 8-digit code valid for 60 secondsSome services use longer codes or periods.
Frequently asked questions
- Where do I get the Base32 secret?
- When you set up 2FA, the site shows a secret key (or QR code) in Base32. Paste that secret here.
- Why does the code keep changing?
- TOTP codes are time-based and refresh every period (usually 30 seconds), which is what makes them one-time.
- Is my secret uploaded?
- No. Codes are computed entirely in your browser and the secret is never sent anywhere.
