MFA Code Generator
Browser-only MFA code generator for teams and security-sensitive users. Outbound connections are limited to this site and one analytics host, so the secret cannot be sent anywhere else.
- Secret never leaves your browser
- Nothing you paste is uploaded
- Works instantly, no signup
Last updated: Oct 20, 2026 11:26:40
Generate a one-time code
Computed in your browser: the secret is not uploaded and not stored. The page makes one analytics request and nothing else.
Most online code generators are fine for a personal account and unsuitable for anything with a security policy attached. The difference is not the algorithm — TOTP is TOTP — it is what the page can do with your secret while you are not looking.
This page is the version for people who have to justify the tool: what it does, what it deliberately cannot do, and how to verify the claim in about ninety seconds.
What makes this one different
Three properties, each independently checkable:
- No network path. Its Content-Security-Policy permits only this site plus one analytics host, so any attempt to ship the key elsewhere is refused by the browser. A malicious script cannot phone home even if one somehow ran.
- No storage. No cookie, no
localStorage, no session record. The secret lives in one input field and dies with the tab. - No server-side compute. HMAC is done with the Web Crypto API on your device. There is no endpoint that could log a key, because there is no endpoint.
For contrast: a generator that posts your secret to an API, even one that “does not store it”, has a server log, a backup, and an operator. The policy question “where does the secret go?” has no good answer.
When this is the right tool at work
| Situation | Why a local generator fits |
|---|---|
| Break-glass access | The vault is unavailable, the phone is elsewhere, and you have the recovery key in a sealed envelope. Nothing is transmitted. |
| Onboarding a shared device | A test phone or a lab device needs a code once. No account gets created, no secret gets stored on a machine you do not control. |
| Verifying an implementation | Compare the code here with the one your service produces; identical output means the parameters and clock agree. |
| Support calls | Walk a user through reading their own code without asking them to hand a secret to a support agent. |
What the policy actually blocks
“The key never leaves” is easy to claim, so here is the specific header this page sends and what each directive prevents:
| Directive | Value | Blocks |
|---|---|---|
connect-src |
this site + one analytics host | every other channel that could carry a secret out |
script-src |
'self' |
Remote and inline scripts; only the theme’s own generator file may run |
img-src |
'self' data: |
Tracking pixels and beacon images from third parties |
font-src |
'self' |
Font requests that leak the page URL to a CDN |
form-action |
'self' |
Submitting the field to another origin |
The important property is that enforcement sits in the browser, not in the page’s code. A script that tried to exfiltrate the key would be stopped by the browser itself, and the violation would be visible in the console. That is a fundamentally different guarantee from “we do not log it”.
Three users, three different reasons
An individual wants a code without installing another app or handing a secret to a random site. The relevant property is that nothing persists: close the tab, and there is nothing left to leak.
A team administrator wants a break-glass route for the day the vault is unreachable. The relevant property is that no shared secret lands on a server the organisation does not control, and that the tool cannot become a shadow IT standard.
An auditor wants a claim that can be tested rather than believed. The relevant property is the header, the absence of storage, and the fact that the output can be checked against RFC 6238 vectors.
All three point at the same design, which is why the page has no features beyond the generator. Every addition — analytics, a “save your accounts” button, a cloud sync — would break one of the three.
Questions security reviewers usually ask
- “Where is the secret processed?” In the browser, with the Web Crypto API. There is no server-side component.
- “What is logged?” The web server logs the page request like any other page. The secret is never in the URL, the body, or a cookie.
- “Could an update change that?” Yes — a future version could ship different JavaScript. That is why the CSP matters: even a changed script cannot open a connection.
- “Is it safe on a shared machine?” The secret is in memory while the tab is open. Close the tab, and do not use it on a machine you believe is compromised.
- “Does it replace our authenticator?” No. It is a break-glass tool, not an enrolled factor.
What it does not replace
Being clear about this matters more than the feature list:
- Not a vault. Nothing is stored, so it cannot hold your accounts for tomorrow. Use a password manager for that.
- Not a policy exception. If your organisation requires a compliant authenticator, a web page is not one — it is a break-glass tool.
- Not protection against a compromised machine. If the device has malware or a hostile browser extension, the secret is readable while it is in the field. No web page can fix that.
- Not a shared-secret solution. Copying one secret into five people’s browsers is a control failure regardless of how the code is generated.
What to write in the risk register
If you need to document the use, these are the claims that are actually true and verifiable:
- The secret is never transmitted — enforced by a Content-Security-Policy header, not by a promise.
- Nothing is persisted client-side; closing the tab discards the key.
- The computation runs in the browser via Web Crypto; there is no server component.
- The page loads no third-party scripts, fonts or analytics.
- The code is deterministic and matches RFC 6238 test vectors.
What you cannot claim: that the user’s device is trustworthy, that the secret was not observed, or that the page replaces an audited authenticator.
How to verify it in ninety seconds
- Open DevTools → Network, clear it, paste a test secret, and generate a code. There should be zero requests after the page load. Any request at all is a red flag.
- Turn off Wi-Fi and reload from cache, or keep the tab open and generate again. Still works means locally computed.
- Check the response headers with
curl -I: look forContent-Security-Policy:connect-srcshould list only this site and the analytics host. - Close the tab and reopen. The field is empty — nothing was saved.
Those four checks are the entire audit. A tool that fails any of them should not receive a secret, however good its privacy policy reads.
Related
If you just need six digits, the 2FA code generator is the simpler page. For the algorithm and every parameter, the TOTP generator. For the definitions your policy document will use, what is MFA. And if a code is being rejected despite correct input, 2FA code not working is the diagnostic order.
Frequently asked questions
What makes this different from other MFA generators?
The page is served with a policy that blocks every network call, so the secret cannot be transmitted even by a compromised script. Nothing is stored locally either - closing the tab discards the key.
Can I use this at work?
For break-glass access and for verifying an implementation, yes. It is not a compliant enrolled authenticator, so it cannot replace your organisation's approved factor.
How do I verify it never sends my key?
Open DevTools, switch to the Network tab, clear it, then generate a code. The only request is the page-view counter, and no request carries your key.
Does it log anything?
The web server logs the page request like any other page. The secret never appears in a URL, a request body or a cookie, because no request containing it is made.
Why does it not save my accounts?
Storage is the thing most likely to leak, so the tool deliberately has none. Use a password manager or an authenticator app to keep accounts.
Can it replace an authenticator app?
No. It generates a code from a key you paste each time; an app stores the key and produces codes on its own.