2FA Code Generator
Paste your secret key, get a TOTP code. Runs entirely in your browser — nothing is sent to a server.
Why use 2FA.zip?
A fast, private way to generate TOTP codes when you need them.
How to generate 2FA codes
Three steps. No sign-up, no download, no hassle.
What is a TOTP code?
TOTP stands for Time-based One-Time Password. It is a method for generating short-lived codes that prove you have access to a shared secret, without sending that secret over the internet every time you log in.
When you enable two-factor authentication on an account, the service gives you a secret key. Your authenticator app (or this tool) combines that key with the current time and runs them through a hash function (HMAC-SHA1). The output is truncated to a 6-digit number. Because both sides know the secret and the time, they both arrive at the same code independently.
Codes change every 30 seconds. Once a window passes, that code is dead. This is why TOTP is a meaningful upgrade over SMS-based two-factor authentication — with SMS, codes are sent in plaintext over the phone network, where they can be intercepted through SIM swapping or SS7 exploits. TOTP codes never travel over a network at all.
The algorithm is defined in RFC 6238 and is the same standard used by Google Authenticator, Microsoft Authenticator, Authy, and pretty much every other authenticator app on the market.
Security & privacy
Everything happens in your browser. When you enter a secret key, it goes straight into the Web Crypto API on your device. No network requests, no server processing, no third-party scripts touching your key.
We do not set cookies, write to localStorage, or log anything about your visit beyond anonymous page-view analytics. Your secret key exists in memory only while the page is open. Close the tab and it is gone. There is no "remember me" option on purpose.
Because the tool runs entirely client-side, it keeps working after you go offline. Load the page once, disconnect, and generate codes for as long as you need. Your device's clock is the only external dependency.
Works with every TOTP-compatible service
If your account supports an authenticator app, it works here.
Frequently asked questions
What is a 2FA setup code?
How often does the code refresh?
Is this tool secure?
Does this work offline?
What if my code doesn't work?
Is this compatible with Google Authenticator?
How is this different from an authenticator app?
Can I use this for multiple accounts?
What is TOTP vs HOTP?
Do you store my secret key?
From the blog
Guides, tutorials, and security tips for two-factor authentication.
Best Authenticator Apps Compared: Google vs Microsoft vs Authy
A practical comparison of the most popular authenticator apps. Features, backup options, and which one works best for different needs.
Read moreHow Two-Factor Authentication Works: A Beginner's Guide
A straightforward explanation of two-factor authentication for people new to online security. What 2FA is, why it matters, and how to set it up.
Read moreIs a Browser-Based 2FA Generator Safe?
Can you trust a web-based TOTP generator with your secret keys? A technical look at client-side processing, security trade-offs, and when it makes sense.
Read more