Skip to main content

AltF Authenticator

Free 2FA code generator and authenticator toolkit

AltF Authenticator generates time-based one-time passwords (TOTP, RFC 6238) from a Base32 secret, an otpauth:// link or a QR image, and the work happens in your browser. It also builds setup QR codes, verifies codes, checks your clock, decodes Google Authenticator exports and runs the official RFC test vectors. Use it to check, migrate, test and recover; keep your everyday 2FA secrets in a dedicated authenticator app or password manager.

  • Free, no sign-up
  • Secrets stay in your browser
  • RFC 6238 self-test built in
  • Works on mobile

Live 2FA codes

Add a secret, an otpauth:// link or a QR screenshot. Codes are calculated on this device with the Web Crypto API and refresh every period.

Spaces and lower case are fine. Base32 uses A-Z and 2-7.

Advanced: algorithm, digits, period

Leave the defaults unless the service says otherwise. An otpauth:// link sets these for you.

Accounts (0)

No accounts yet

Try the RFC demo secret to see how it works.

Secrets stay in this tab. No request made by this page contains a secret or a code, and nothing goes to analytics. Saving is optional and encrypted on this device; set a passphrase or wipe it in the 2FA Authenticator vault tool.

Start from what happened

Authenticator tools and 2FA guides

TOTP code generatorGenerate TOTP 2FA codes from a Base32 secret, otpauth:// link or QR image. SHA-1, SHA-256 or SHA-512, 6 or 8 digits, calculated in your browser.otpauth QR code generatorBuild an otpauth:// URI with issuer, account, algorithm, digits and period, and draw the 2FA setup QR code in your browser. Free, nothing uploaded.TOTP secret key generatorGenerate a random 160-bit Base32 TOTP secret with your browser's secure random number generator, plus the otpauth link and QR code. Nothing is sent.TOTP code verifierCheck whether a 2FA code matches a secret within a window of time steps, and see which step matched and the clock drift that implies. Runs in your browser.HOTP generatorGenerate HOTP counter-based one-time passwords per RFC 4226 from a Base32 secret and any counter value. Includes the RFC test values. Runs in your browser.Google Authenticator export decoderDecode a Google Authenticator Export accounts QR (otpauth-migration://) into standard otpauth links and secrets, locally in your browser. Nothing uploaded.2FA backup codesGenerate random recovery codes, download or print them, and learn where to store your real 2FA backup codes so a lost phone does not lock you out.2FA code not workingWhy your authenticator code is rejected and how to fix it: check your device clock, the secret, the account and non-default settings. Free clock check.RFC 6238 test vectorsThe 18 RFC 6238 Appendix B TOTP test vectors for SHA-1, SHA-256 and SHA-512, with seeds, times and expected 8-digit codes, run live in your browser.

Guides

How to generate a 2FA code from a secret key

  1. 1

    Find the secret

    On the service's 2FA setup screen, choose the option to enter a key manually, or save the QR code image. The secret is a string of letters A to Z and digits 2 to 7.

  2. 2

    Add the account

    Open the Live codes tab and paste the Base32 secret or the otpauth:// link, or upload or paste the QR image. The image is decoded in your browser.

  3. 3

    Match the settings

    Leave SHA-1, 6 digits and 30 seconds unless the service says otherwise. An otpauth:// link or QR code sets these for you.

  4. 4

    Enter the code before the ring runs out

    Type or copy the current code into the service. If the ring is nearly empty, wait for the next code.

  5. 5

    If the code is rejected, check the clock

    Open the Clock check tab. If your device time is off by more than a few seconds, turn on automatic time and try again.

  6. 6

    Save the secret properly

    Add the same secret to a dedicated authenticator app or password manager, and keep the service's backup codes somewhere safe and offline.

What each tool does, and what leaves your device

What each AltF Authenticator tool does, what leaves your device and what it does not do
ToolWhat it doesWhat leaves your deviceWhat it does not do
Live codesShows live TOTP codes for several accounts from a Base32 secret, otpauth:// link or QR image, with a countdown, the next code and one-click copy.Nothing. QR images are decoded in the browser. If you choose Save on this device, accounts are encrypted and stored in this browser only.Not a replacement for an authenticator app, and no sync between devices.
Set up 2FAGenerates a random 160-bit Base32 secret, builds the otpauth:// URI with issuer, account, algorithm, digits and period, and draws the QR code.Nothing. The secret and QR code are made in your browser.Does not enrol the secret with any service; your own app or server must store it.
Verify a codeChecks a code against a secret across a window of time steps and reports which step matched and the clock drift that implies.Nothing. The check runs in your browser.Does not track used codes, so it cannot detect replay the way a real server should.
HOTP counterGenerates counter-based codes per RFC 4226 for any counter value you choose.Nothing.Does not know the counter value your service expects; you must track it.
Decode exportDecodes a Google Authenticator otpauth-migration:// export QR into standard otpauth:// links and secrets.Nothing. The QR and its payload are decoded in your browser.Cannot open exports from apps that encrypt their backups, and does not import into other apps for you.
Backup codesGenerates random recovery codes, lets you download them as .txt or print them, and gives a storage checklist.Nothing.The codes are not registered with any service and cannot unlock your accounts.
Clock checkCompares your device clock with AltFTool server time and says whether the difference is large enough to break codes.One time request to AltFTool's own server. It carries no secret, code or account name.Cannot change your device clock; it tells you how far off it is and how to fix it.
Self-testRuns the 18 RFC 6238 Appendix B test vectors through the same code as the live codes and shows pass or fail for each.Nothing.Proves the algorithm is correct, not that a particular service is configured correctly.

How the codes are calculated

  • TOTP (RFC 6238): the counter is T = floor((current Unix time - T0) / X), with T0 = 0 and a default step X of 30 seconds. The counter is written as an 8-byte big-endian integer.
  • HOTP (RFC 4226): the browser's Web Crypto API computes HMAC over that counter with the shared secret, using HMAC-SHA-1 by default, or SHA-256 or SHA-512 when the account says so.
  • Dynamic truncation: the low 4 bits of the last HMAC byte pick an offset, 4 bytes are read from there, the top bit is cleared and the result is reduced modulo 10^digits, then padded with leading zeros.
  • QR images are read with the jsQR library inside the page. otpauth:// links are parsed locally, and Google Authenticator export links are decoded from their base64 protobuf payload in the browser.
  • New secrets come from crypto.getRandomValues: 20 random bytes (160 bits, the length RFC 4226 recommends), encoded as 32 Base32 characters.
  • Accounts live in memory by default and are gone when the tab closes. If you choose Save on this device, they are encrypted with AES-256-GCM and stored in this browser's IndexedDB, under either a non-extractable device key or a key derived from your passphrase with PBKDF2-SHA256 at 600,000 iterations.
  • The self-test runs the 18 RFC 6238 Appendix B vectors through the same code that makes your live codes, so you can see the maths is right on your own device.

What AltF Authenticator does not do

  • It is not a replacement for a dedicated authenticator app. A browser tab is easy to close, and anything that can read your browser can read secrets you type into it.
  • It cannot recover a lost secret. If you no longer have the secret, a backup code or another sign-in method, only the service's own recovery process can help.
  • Backup codes it generates are random strings for your own app or notes. They are not registered with Google, Microsoft or any other service.
  • It does not support push approvals, SMS codes, passkeys or hardware security keys, and it does not sync between devices.
  • Copied codes are cleared from the clipboard after 30 seconds on a best-effort basis. Clipboard managers and some browsers can keep their own copy.
  • The clock check compares against AltFTool's server time over the network, so it is accurate to within about the request's round-trip time, not to the millisecond.

AltFTool never receives your secrets or codes. The only network request any tab makes is the clock check, which asks AltFTool's server for the time and carries nothing else.

Authenticator and 2FA code FAQ

Why is my 2FA code not working?

The most common cause is a wrong device clock. TOTP codes depend on the current time, and most services only accept codes from a small window around it, so a clock that is off by more than about 30 seconds gives codes the server rejects. Turn on automatic date and time, then try again. Other causes are a mistyped secret, the wrong account, or non-default settings such as SHA-256 or 8 digits that your app ignored. The Clock check and Verify tabs help you find which one it is.

Is it safe to generate 2FA codes online?

It depends on where the secret goes. Here the code is calculated in your browser and the secret is not sent to any server, which you can confirm in your browser's network tab. Even so, a browser tab is a weaker place to keep a secret than an authenticator app, because extensions and malware on the device can read the page. Use it on a device you trust, for checking, testing, migrating or an emergency, and keep the secret in a proper app.

What is a TOTP secret?

It is a random shared key that a service gives you when you turn on app-based 2FA. It is usually shown as Base32 text (letters A to Z and digits 2 to 7) and is also inside the setup QR code. Your app and the server both combine the secret with the current time to make the same 6-digit code. Anyone who has the secret can make your codes, so treat it like a password.

Can I use this instead of Google Authenticator?

Not as your everyday authenticator. By default the accounts you add here are gone when you close the tab, and a browser is easier to attack than a phone app. It produces the same codes as Google Authenticator for the same secret, which makes it useful to check a secret, test a setup or get a code in an emergency. Keep your secrets in a dedicated authenticator app or a password manager.

How do I move Google Authenticator to a new phone?

On the old phone, open Google Authenticator, choose Transfer accounts, then Export accounts, and scan the QR code (or codes) with Google Authenticator on the new phone. Check that every account shows a code on the new phone before you remove anything from the old one. If you want to move the accounts to a different app, the Decode export tab can turn the export QR into standard otpauth:// links locally.

Does AltF Authenticator store my secrets?

Not unless you ask it to. By default accounts live only in the page's memory. If you turn on Save on this device, they are encrypted with AES-256-GCM and stored in this browser's IndexedDB, protected by a non-extractable device key or by your passphrase. Nothing is uploaded and there is no account or sync.

What do I do if I lost the phone with my authenticator app?

Sign in on another device and use one of the backup codes the service gave you when you set up 2FA, or another method you enrolled such as a security key or a second phone. If you have none, use the service's account recovery process. Once you are in, remove the old authenticator, set up 2FA again on your new device and save new backup codes.

Why does my code have 8 digits or change every 60 seconds?

Some services use non-default settings: 8 digits, a 60-second period or HMAC-SHA-256 or SHA-512. These are allowed by RFC 6238 and are written into the otpauth:// link. Some versions of Google Authenticator have ignored these parameters, so if your app shows a 6-digit code that keeps failing, add the account here from the full link to see the code the service expects.

What is the difference between TOTP and HOTP?

Both use the same HMAC and truncation steps. HOTP (RFC 4226) uses a counter that goes up each time you make a code, so the code stays valid until it is used. TOTP (RFC 6238) uses the current time divided into 30-second steps as the counter, so each code expires on its own. Most websites use TOTP.

Are the backup codes from this tool linked to my accounts?

No. They are random codes made in your browser for your own use, for example if you are building a 2FA system and need codes to register, or want a template. Real backup codes for Google, Microsoft or any other service must come from that service's security settings.

Does the clock check send my secret?

No. It makes one request to AltFTool's own server to read the server's time, and the request contains no secret, code or account name. Every other tab works without sending anything.