Skip to main content

TOTP / 2FA Code Generator

Create a 2FA secret and QR code, see the live one-time code with a countdown, and check a code. Runs in your browser; for testing. Free and private.

Use this for testing. For real accounts, keep secrets in an authenticator app.

Secret

Check a code

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Free TOTP and 2FA Code Generator

Make a secret, scan the QR code into an authenticator app, and watch the live code. Everything is calculated in your browser. It gives developers a quick browser-based way to solve a focused totp / 2fa code generator task before moving the result into a project.

How to use it

Press New secret, or paste a Base32 secret or an otpauth:// link. The current code and a countdown appear. Type a code from your app into the check box to test it.

Common mistakes

  • Different digits, period or algorithm from the app: the codes will never match.
  • A wrong clock on a phone or computer: the codes are time based.

Frequently asked questions

What is a TOTP code?
A time-based one-time password: a 6 or 8 digit number computed from a shared secret and the current time. It changes every 30 or 60 seconds.
Is it safe to put a real secret here?
The secret stays in your browser and is not sent anywhere or saved. Even so, use this page for testing. For real accounts, keep secrets in an authenticator app.
Why does the code not match my app?
The digits, period and algorithm must match. Also check that your device clock is correct.
What does the verify window mean?
A code from one period before or after the current one is accepted, to allow for small clock differences.
How do I use this totp / 2fa code generator tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More DevOps & Network

View all DevOps & Network tools →