TOTP / 2FA Code Generator

Generate TOTP 2FA codes from a base32 secret key in your browser. Shows current, previous, and next codes with live countdown. All local, no data sent.

Paste the secret key from a site’s two-factor setup page (the code shown under or instead of the QR code) and this 2FA generator shows the current one-time code, refreshed every 30 seconds — the same codes Google Authenticator or Authy would show. The secret stays in your browser.

Open TOTP / 2FA Code Generator → free, no sign-in
open full screen ↗

TOTP (Time-based One-Time Password) is the algorithm behind every authenticator app. The TOTP / 2FA Code Generator implements it directly in the browser: paste your base32 secret key, and see the current, previous, and next 6 or 8-digit codes with a live countdown to the next refresh. Useful for testing 2FA implementations or recovering codes when your phone isn't available.

Developers building or testing two-factor authentication systems, security engineers verifying TOTP configuration, or anyone who needs to generate TOTP codes from a known secret key without installing an authenticator app.

01 Open the TOTP / 2FA Code Generator on Doathingy.com
02 Enter your base32 secret key
03 See current, previous, and next 2FA codes
04 Use the current code or check timing with the countdown

No tutorials. No learning curve. Open it and get started.

No server uploads. Shows current, previous, and next codes simultaneously — useful for debugging time-sync issues in TOTP validation.

Completely free. No trial period. No premium tier for basic functionality. No account required. Use it as often as you need.

One job, done well. TOTP / 2FA Code Generator was built to solve a specific problem cleanly. No feature bloat, no ads, no distractions.

What is TOTP?

Time-based One-Time Password — generates a new 6 or 8 digit code every 30 seconds based on a shared secret key and the current time.

Where do I get the base32 secret?

From your application's 2FA setup page — usually shown as a QR code (which encodes a base32 secret) or as a manual entry code.

Why show previous and next codes?

Useful when debugging time-sync issues — systems typically accept codes from adjacent time windows.

Is this safe to use?

Client-side only — your secret key is never transmitted. However, treat your 2FA secret with the same care as a password.

Can I use this as a substitute for an authenticator app?

For development and testing yes. For personal account security, use a dedicated authenticator app with encrypted storage.

Free. Instant. No sign-in. Open it and get the job done.

Open TOTP / 2FA Code Generator on Doathingy.com →
Browse all free tools →

— common questions

How do I generate a 2FA code online?

Paste your base32 secret key into the generator. It shows the current TOTP code and a countdown until the next one, exactly like an authenticator app.

Is it safe to put my 2FA secret into a website?

This generator calculates the codes in your browser and sends nothing anywhere. Even so, treat a secret key like a password — for everyday logins an authenticator app on your phone is the safer home for it.

Why doesn’t my code work?

TOTP codes depend on the time. If your device clock is off by more than about 30 seconds, codes won’t match — try the previous or next code shown, and set your clock to update automatically.

— more free tools like this

Password GeneratorGenerate secure, random passwords with customizable lengths, character sets, and quantities.Random Password GeneratorGenerate secure, random passwords with customizable length and character sets.Password Protect PDFAdd password protection to PDF documents, configure permissions, and download the secured file.Image to Base64 ConverterConvert various image file formats into a Base64 data URL and copy the encoded string.Base64 Encoder/DecoderEncode text or files to Base64 and decode Base64 strings back to text or files.Password Strength AnalyserAssess password robustness in real-time, displaying strength, entropy, and crack time estimates.

All Crypto Tools →

Need it to work a little differently?

Describe the tool you need in plain words and Doathingy builds it for you in about a minute. It runs in your browser and stays in your library. Free to start.

Build your own tool →