⏱️

TOTP Generator

Generate Time-based One-Time Passwords (TOTP) for 2FA authentication

Input
TOTP Code
🔒 All processing runs in your browser. Your data is never sent to any server.

📖 What is this tool?

TOTP Generator creates Time-based One-Time Passwords (RFC 6238) from any Base32 secret key — the same algorithm used by Google Authenticator, Authy and other 2FA apps. Use Live Mode to see codes refresh every 30 seconds.

💡 Example

Input
Secret: JBSWY3DPEHPK3PXP
Output
Code: 123456 Expires in: 18 seconds

🛠️ Common Use Cases

  • Generate 2FA codes for testing
  • Verify TOTP implementation correctness
  • Understand how two-factor authentication works
  • Test authenticator app setup flows
  • Debug TOTP time synchronization issues

❓ Frequently Asked Questions

How does TOTP work?
TOTP combines a shared secret key with the current time (in 30-second intervals) and runs HMAC-SHA1 to generate a 6-digit code. Both your device and the server compute the same code independently.
Why does my TOTP code not work?
TOTP is time-sensitive. If your device clock is out of sync by more than 30 seconds, codes will fail. Check your device's time sync settings. Most servers allow a 1-interval tolerance.
Is TOTP the same as SMS 2FA?
No — TOTP is more secure. SMS 2FA can be intercepted via SIM swapping attacks. TOTP codes are generated offline on your device and never transmitted, making them much harder to intercept.
🔒
Your data stays private. All processing happens entirely in your browser. Nothing is ever sent to our servers. You can use this tool offline after the page loads.