2FA Code Generator

Generate TOTP two-factor authentication codes from your secret key

Enter your secret key to generate 2FA codes. The secret key is usually provided when you enable two-factor authentication on services.

Your authentication code
000 000
New code in 30s
Safe & Secure
Your secret key never leaves your browser. All codes are generated entirely with JavaScript on your device.

What is 2FA Code Generator?

2FA Code Generator is an online tool for generating TOTP (Time-based One-Time Password) two-factor authentication codes. It works just like Google Authenticator or Authy, but runs directly in your browser without installing any app.

How to Use

Step 1: When enabling two-factor authentication on any service (Google, Facebook, GitHub...), you will receive a Base32 secret key.

Step 2: Enter the secret key in the field above and click "Get Code".

Step 3: A 6-digit code will be generated and automatically refreshed every 30 seconds. Use this code to log in.

Where to Find Secret Key?

The secret key is provided when you set up two-factor authentication. It is usually displayed as a QR code or a text string (e.g., JBSWY3DPEHPK3PXP). If you have already scanned the QR code, look for the "Can't scan?" or "Enter manually" option to get the text secret key.