How to Use the TOTP / 2FA Code Generator (Offline)
-
1
Enter your Base32 TOTP secret key (from your authenticator app QR code).
-
2
The 6-digit TOTP code generates automatically and refreshes every 30 seconds.
-
3
View the countdown timer to know how long the current code remains valid.
Practical Example & Use Case
Generating a TOTP code for a server with no smartphone nearby, using only the Base32 secret stored in a password manager.
Technical Notes & Limitations
Requires your system clock to be accurate (within ±30 seconds of UTC). TOTP codes are time-synchronized — an incorrect system time will produce invalid codes.
Frequently Asked Questions
Is it safe to enter my 2FA secret here?
The tool runs 100% in your browser. No data is sent to any server. However, treat your TOTP secret with the same care as a password — do not enter it on any untrusted device.
How does TOTP work?
TOTP generates a code by computing HMAC-SHA1(secret, floor(current_unix_time / 30)) and truncating to 6 digits. The 30-second window allows ±1 step tolerance for clock drift.