The short version: this tool never sends your key anywhere, and you can prove that in about ten seconds. But a browser-based generator is the wrong tool for your most valuable accounts, and we would rather tell you that than win the click. The reasoning is below.

What this tool actually does

2FA Gen computes TOTP codes using the Web Crypto API, a cryptographic engine built into your browser. You paste a Base32 secret, the browser derives an HMAC from that secret and the current time, and the result is truncated into a six-digit code exactly as RFC 6238 specifies.

Everything in that sentence happens inside the tab. There is no API call, no server-side computation, and no logging, because there is no server-side component to this feature at all. The page is static files served by nginx.

Verify it yourself in ten seconds

Do not take our word for any of this. Two tests settle it:

  1. The network test. Open your browser's Developer Tools, switch to the Network tab, then generate a code. After the initial page load you will see zero requests. If a secret were being transmitted, it would appear here.
  2. The offline test. Load this page, then disconnect from the internet entirely — turn off Wi-Fi, unplug the cable. Generate a code. It still works, and it still matches your authenticator app. Software that needs a server cannot do that.

Both tests work on any page of this site, in any browser, with no special tooling.

The honest limitation

Here is what most tools in this category will not tell you.

The security of any TOTP system rests entirely on the secret staying secret. Pasting that secret into a web page — any web page, including this one — means trusting that the page you loaded is the page the operator intended to serve. That trust is well founded most of the time and it is not absolute. A compromised server, a hijacked domain, or a malicious browser extension with access to the page could change what the code does between one visit and the next.

So we will say plainly what the incentives discourage:

That is a narrower recommendation than our competitors make. We think it is the correct one, and a tool that tells you when not to use it is worth more than one that does not.

How the page defends itself

What we cannot protect you from

A clear threat model has to include its own boundaries:

Cryptographic details

For readers who want the specifics rather than the reassurance:

The implementation is verified against all eighteen published test vectors in RFC 6238 Appendix B — every timestamp across all three hash algorithms — plus the full range of Base32 key lengths. If those vectors pass, the arithmetic is correct against the published standard, which is a stronger claim than "it seems to work".

Reporting a vulnerability

If you find a security issue, we want to hear about it before anyone else does.

Write to security@2fagen.com with enough detail to reproduce the problem. We aim to acknowledge within 72 hours and will keep you updated while we work on a fix. We will credit you when the fix ships unless you prefer otherwise.

Please do not run automated scanners against the site — they generate noise without finding anything a static site is vulnerable to. Manual reports about the cryptography, the page's handling of secrets, or the server configuration are genuinely welcome.

We do not currently operate a paid bug bounty.

Changes to this page

Security claims should be dated. Material changes to this page and to the tool are recorded in the changelog.

Last reviewed: 10 September 2026