Emojar – free online tools

TOTP / 2FA Code Generator

Generate time-based one-time passwords (TOTP) like an authenticator app: enter a Base32 secret or an otpauth:// link and see the current 6- to 8-digit code with a countdown, plus the previous and next codes. Useful for testing 2FA and recovering from a backup secret.

This tool runs entirely in your browser.

Loading tool…

How to use the TOTP / 2FA Code Generator

  1. 1Paste the secret key (letters A–Z and digits 2–7) or the full otpauth:// link from a QR code.
  2. 2Check the algorithm, digits and period match the service (most use SHA-1, 6 digits, 30 s).
  3. 3Use the current code before the countdown runs out.

What is the TOTP / 2FA Code Generator?

TOTP (RFC 6238) is the algorithm behind Google Authenticator, Microsoft Authenticator, 1Password and most 2FA apps. Both sides know a shared secret; every 30 seconds each computes an HMAC of the current time step and reduces it to a short code. Because the code depends only on the secret and the clock, this page produces the same codes as your app — verified against the RFC’s test vectors.

A QR code for 2FA contains an otpauth:// link with the secret and settings; scan it with the QR Code Scanner to read it. Treat the secret like a password: anyone who has it can generate your codes. This page keeps it in memory only and stores nothing.

Frequently asked questions

Why doesn’t the code match my app?

Most often the device clock is off — enable automatic time. Also check the algorithm, digits and period, and that the secret has no typos.

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

Only into one you trust, because the secret is equivalent to the second factor. This page runs entirely in your browser and sends nothing, but for everyday logins keep using a dedicated authenticator app.

Is the TOTP / 2FA Code Generator free and private?

Yes. The TOTP / 2FA Code Generator is free, needs no account, and runs entirely in your browser. What you type is never sent to a server or stored.