Skip to content
browserutils

TOTP Generator

Generate time-based one-time passwords

TOTP Generator is a free online tool from BrowserUtils that generate time-based one-time passwords. It runs entirely in your browser — your data never leaves your device. No account required.

Digits:
Period:
TOTP Code
--- ---

How to use TOTP Generator

  1. 1 Paste or type your input into the editor above.
  2. 2 The tool processes your data instantly — right in your browser, with nothing sent to a server.
  3. 3 Copy the result with one click or continue editing your input.

About TOTP Generator

Free online TOTP generator. Generate RFC 6238 time-based one-time passwords from a Base32 secret key with configurable digits and period. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.

TOTP Generator specs

Runtime
100% client-side (browser)
Built on
Web Crypto API (SubtleCrypto) for hashing and crypto.getRandomValues for secure randomness
Cost
Free — no account, no rate limits, no usage caps
Browser support
Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
Part of
299 developer tools on BrowserUtils (100% client-side)

Questions

What is TOTP?
TOTP (Time-based One-Time Password) is a standard algorithm (RFC 6238) used by authenticator apps like Google Authenticator and Authy. It generates a short numeric code that changes every 30 seconds based on a shared secret key.
Is this secure to use online?
The TOTP code is generated entirely in your browser using the Web Crypto API. Your secret key never leaves your device. However, for production 2FA, always use a dedicated authenticator app.
Why does my TOTP code not match the authenticator app?
TOTP codes depend on the system clock. If your computer clock is more than 30 seconds off from the server, codes will not match. Sync your system time and make sure the secret key is correct.
What is the difference between TOTP and HOTP?
TOTP generates codes based on the current time, so they expire every 30 seconds. HOTP generates codes based on a counter that increments with each use. TOTP is more common because it does not require counter synchronization.
Can I use this TOTP tool to test my 2FA implementation?
Yes, enter the same Base32 secret key used by your server and verify that the generated codes match. This is useful for debugging time synchronization and configuration issues during development.
How do I extract a TOTP secret from a QR code?
Scan the QR code with a QR reader to get the otpauth:// URI. The secret parameter in that URI is the Base32-encoded key you can paste into this tool.
Embed this tool

Copy this code to embed the tool on your website. Adjust the height to fit your layout.

<iframe src="https://www.browserutils.dev/embed/totp-generator" width="100%" height="500" frameborder="0" title="TOTP Generator"></iframe>

Related tools

More Hashing & Crypto

View all Hashing & Crypto tools