Private · Local · Free

Generate 2FA codes
right in your browser

Paste your secret key or otpauth:// URL — your 6-digit TOTP code appears instantly. Nothing leaves your device.

Secret key or otpauth:// URL — one per line
sec left
100% browser-side
No server calls
Nothing stored
Works offline
Free forever
⚠️

Security Notice

While this tool is 100% local and private, you should never paste high-value production keys (like your bank or primary email) into any web browser. Use this tool for testing, recovery, or low-security accounts.

How it works

Uses the open TOTP standard (RFC 6238) — same algorithm as Google Authenticator, Authy, and Microsoft Authenticator.

Step 1

Paste your key

Enter your Base32 secret or full otpauth:// URL from the service you're authenticating with.

Step 2

Code appears

Your 6-digit TOTP code generates instantly in the browser. A timer shows when it refreshes.

Step 3

Copy & use

Hit Copy and paste it into your login form before the 30-second window expires.

2FA Guides

All guides →

Frequently asked questions

Is 2faco safe? +

Yes. All code generation happens entirely in your browser via client-side JavaScript. Your secret keys are never transmitted to any server and are never stored.

How do I find my secret key? +

Your secret key is shown when you first enable 2FA on a website — usually as a QR code with a text fallback like JBSWY3DPEHPK3PXP. If you saved an otpauth:// URL, paste that directly.

Why does my code say INVALID KEY? +

The key format may be wrong. It must be a valid Base32 string (letters A–Z and digits 2–7) or a complete otpauth:// URL. See the troubleshooting guide.

Does it work offline? +

Once the page is loaded, yes — TOTP codes are calculated locally using your system clock. No internet connection is needed to generate codes.

The Comprehensive Guide to Two-Factor Authentication

What is 2FA and Why Do You Need It?

Two-Factor Authentication (2FA), often referred to as Multi-Factor Authentication (MFA), is an extra layer of security designed to ensure that you're the only person who can access your account, even if someone knows your password. By requiring a second form of identification—like a time-based code generated on your device—you drastically reduce the risk of unauthorized access. According to cybersecurity experts, enabling 2FA blocks 99.9% of automated bot hacks.

How Time-Based One-Time Passwords (TOTP) Work

The most common and secure method of 2FA relies on the TOTP protocol. When you set up 2FA for an account, the service provides a "secret key" (often represented as a QR code). This secret key is securely stored in your authenticator app (or used in our browser-based tool). The authenticator uses a cryptographic algorithm (HMAC-SHA1) combining this secret key with the current time (measured in 30-second intervals from the Unix Epoch) to generate a unique 6-digit code. Because the service also knows the secret key and the current time, it generates the same code. If the code you input matches the server's code, you are granted access.

Why Browser-Side Security Matters

Many online tools that promise to generate 2FA codes actually send your secret key to their servers to compute the code. This is a massive security risk. If their server is breached, or if they maliciously log network traffic, your secret key is compromised. 2faco was built to solve this problem by executing all cryptographic functions entirely within your browser using JavaScript. No data ever leaves your device, meaning your keys remain strictly private.

The Danger of SMS Verification (SIM Swapping)

Historically, many services sent 2FA codes via SMS text messages. However, this method is highly vulnerable to "SIM swapping" attacks. Hackers can trick your mobile carrier into transferring your phone number to a SIM card they control. Once they have your number, they receive all your SMS 2FA codes and can easily bypass your security. Transitioning to an app-based TOTP system entirely eliminates this risk, as the codes are generated locally on your hardware, not transmitted over vulnerable cellular networks.