TOTP Token Generator logoTOTP Token Generator
No signup · Nothing stored

TOTP Generator

Paste a secret, get the current code

Paste a Base32 secret key and this TOTP generator shows the current time-based one-time password with a live countdown to the next rotation. There is no account, no password and no storage: the code is computed in your browser with the WebCrypto API, and the secret is discarded the moment you reload or close the page.

What is a TOTP generator?

A TOTP generator is a tool that turns a shared secret key into a short, time-based one-time password — the six- or eight-digit code your bank, email provider or VPN asks for after you type your password. The algorithm behind it is defined by RFC 6238 and is the same one used by Google Authenticator, Authy and every other authenticator app, so a code produced here is accepted wherever standard two-factor authentication is supported.

The difference is where the calculation happens. Instead of installing an app, you paste the secret key once, read the code off the screen and type it into the login prompt. Because the secret never leaves the page, this TOTP generator works on a borrowed laptop, a locked-down work machine or a phone you would rather not fill with apps.

How to use the TOTP generator

1Step 1

Paste your secret key

Enter the Base32 secret from your 2FA setup screen — the string of letters and digits shown next to "manual entry", or the secret hidden inside the otpauth:// QR code. Spaces, dashes and lowercase letters are cleaned up automatically, so you can paste the key exactly as it appears. A valid secret produces the first code immediately.

2Step 2

Match the parameters

Most services use 6 digits and a 30 second period, which are the defaults here. If your provider asks for 8 digits or a 60 second window, change the two selectors and the code updates instantly. The algorithm stays on SHA-1, which is what virtually every consumer service expects.

3Step 3

Copy the code before it rotates

Click the digits or the Copy button to put the current code on your clipboard, then paste it into the login prompt before the countdown ring empties. When the ring reaches zero a fresh code is generated automatically and the old one stops working, so never reuse a code you copied more than a few seconds ago.

Digits, period and algorithm explained

Every TOTP code is defined by three parameters, and they have to match what your provider expects. Get one wrong and the code looks perfectly valid, yet the server rejects it every time.

Digits
The length of the code. Six digits is the near-universal default; eight digits is used by a minority of providers, mostly in banking and enterprise VPNs. Choose the wrong length and the login form will reject every code.
Period
How many seconds a code stays valid. Thirty seconds is the standard; sixty seconds is rarer and usually found on older hardware tokens. If your codes are rejected roughly half the time, a period mismatch is the most likely cause.
Algorithm
The hash function used to derive the code. SHA-1 is what almost every consumer service uses and is the only option this generator offers. SHA-256 and SHA-512 exist in the specification but are rarely deployed.

Which services accept these codes

Any service that supports standard TOTP two-factor authentication accepts a code from this generator: GitHub, Google, Microsoft, Apple, AWS, Dropbox, Cloudflare, Slack, Discord, Steam and thousands more. If the setup screen shows a Base32 secret or an otpauth:// QR code, the codes are interchangeable with those from any other authenticator — the server has no way to tell where a code came from.

One exception is worth knowing. Services that rely on push notifications, SMS or a proprietary protocol — the default Google prompt, or a bank's own app — never expose a TOTP secret, so there is nothing to paste into a TOTP generator.

TOTP generator vs. an authenticator app

An authenticator app stores your secrets permanently and produces codes on demand; a TOTP generator keeps nothing and asks for the secret each time. That makes the generator the better choice for a one-off login on a machine you do not own, for testing a new 2FA setup, or for regaining access when your phone is lost, broken or out of battery.

The trade-off is convenience. Because this page stores nothing, it cannot remember your secrets between visits — you paste the secret again each time, or keep it somewhere safe. For everyday two-factor authentication, an encrypted vault that keeps the secrets on your own device is the safer and faster option.

Is a browser-based TOTP generator safe?

The secret you paste is held in memory only. It is never written to the URL, to local storage or to a server, and it is discarded the instant you reload or close the tab. Code generation uses the WebCrypto API locally, so the secret is never transmitted and there is no copy to intercept in transit.

The honest caveat is attack surface. A web page is more exposed than a native app: a malicious browser extension or an injected third-party script could in principle read what is on the page. Keep your browser updated, keep extensions to a minimum, and prefer an offline vault for the secrets you rely on every day.

Frequently asked questions

What is a TOTP generator?+
A TOTP generator turns a shared secret into a short, time-based one-time password using the RFC 6238 algorithm. Every 30 seconds it combines that secret with the current time to derive a fresh 6- or 8-digit code, which you type in as the second factor when you sign in.
Do I need an account or a password?+
No. This TOTP generator has no account, no password and no vault. You paste a secret, read the code and close the tab. Nothing is written to the URL, to local storage or to a server.
Where is my secret stored?+
Nowhere. The secret stays in the page's memory and is discarded as soon as you reload or close the tab. Code generation runs locally through the WebCrypto API, so the secret is never transmitted.
Which services work with these codes?+
Any service that supports standard TOTP two-factor authentication — GitHub, Google, Microsoft, AWS, Dropbox, Cloudflare and thousands more. As long as the service shows a Base32 secret or an otpauth:// QR code during setup, the codes generated here are interchangeable with those from any other authenticator.
Why is my code rejected even though it looks correct?+
Almost always a parameter mismatch or clock drift. Check that the digits and period match your provider's setup screen — 6 digits and 30 seconds is the usual combination — and make sure your device clock is accurate, because a TOTP code is derived from the current time. A phone or laptop more than about 30 seconds off will produce codes the server treats as expired.
Can I use this TOTP generator offline?+
Yes, once the page has loaded. The code is derived from the secret and your device clock with no network call, so you can generate a 2FA code on a plane, in a server room or anywhere else without a connection. Only the initial page load needs the network.
Is it safe to paste a secret into a website?+
It is safe when the page computes the code locally and never transmits the secret, which is how this tool works. You can verify that yourself: open your browser's developer tools, watch the network tab and confirm that typing a secret triggers no request. If a site does send your secret to a server, do not use it.
Does the TOTP generator work on mobile?+
Yes. The layout is responsive and the tool runs in any modern mobile browser, so you can generate a code on a phone or tablet without installing an app. A single tap copies the code to the clipboard.
Should I use this instead of an authenticator app?+
Use it for a one-off code, a test, or a device where you would rather not install an app. For everyday 2FA, an encrypted vault that keeps your secrets on the device is safer — this page deliberately keeps nothing, which also means it cannot remember your tokens for you.
Why does the code keep changing?+
That is the point of TOTP: the code is derived from the current time step, so it rotates on a fixed schedule — every 30 seconds by default. The countdown ring shows how long the current code remains valid.