Skip to content
⚠ TESTING ENVIRONMENT You are viewing a testing copy of Tolioo. Changes here do not affect the live website.

TOTP Authenticator

Generate 2FA codes from a secret key, make a QR code and verify codes online. Your secret never leaves your browser.

  • 100% free
  • RFC 6238 compliant
  • Runs in your browser
Enter a secret key to see your code
--- ---
Refreshes in --sNext: --- ---

Device time (UTC): --:--:--

Your Privacy Matters

Codes are calculated inside your browser. Your secret key is never uploaded, logged or stored on our server.

ADVERTISEMENT
Demo Ad 728 x 90

How to use the TOTP authenticator

1Add your secret key

Paste the Base32 secret or the full otpauth:// link, or generate a new random secret.

2Read the live code

A 6-digit code appears and refreshes with a countdown. Copy it with one click.

3Create a QR or verify a code

Make a QR code to scan into an authenticator app, or check a code with the Verify tab.

TOTP & 2FA GUIDE

Free Online TOTP Authenticator – 2FA Code Generator, QR Code and Verifier

Need a 2FA code without your phone? This free TOTP authenticator generates time-based one-time passwords from a Base32 secret key, creates an otpauth QR code and verifies codes, following RFC 6238 with SHA-1, SHA-256 or SHA-512. Everything runs in your browser with the Web Crypto API, so your secret is never uploaded or stored. Use it for testing, development and backups, and keep real secrets on devices you trust.

Live 2FA Code Generator

See the current one-time code with a countdown, plus a preview of the next code so you never miss the change.

Standard TOTP (RFC 6238)

Built on HOTP (RFC 4226) with SHA-1, SHA-256 or SHA-512, 6 to 8 digits and 15, 30 or 60 second periods.

QR Code and Setup Link

Turn a secret into an otpauth:// link and QR code you can scan into any authenticator app.

Verify Codes with Drift Check

Test a code against the secret and see if it matches the current step or a nearby one.

Secure Secret Generator

Create a random 160-bit Base32 secret with your browser's secure random number generator.

Runs in Your Browser

No uploads, no account and nothing saved. Your secret stays on your device and disappears when you close the tab.

How to Use the TOTP Authenticator

  1. Add the secret: Paste the Base32 secret key from your service, or paste the full otpauth:// link. To start fresh, click Generate a new secret.
  2. Check the settings: Leave SHA-1, 6 digits and 30 seconds unless your service says otherwise.
  3. Read the live code: The Live code tab shows the current code, a countdown bar and the next code. Click Copy code to use it.
  4. Create a QR code: Open the QR & link tab to scan the secret into an authenticator app, or download it as SVG or PNG.
  5. Verify a code: Open the Verify code tab, type a code from your app and choose how much time drift to allow.
  6. Store the secret safely: Nothing is saved here, so keep your secret in a password manager before closing the page.

What Is TOTP (Time-Based One-Time Password)?

TOTP is the standard behind most two-factor authentication (2FA) apps. It is defined in RFC 6238 and extends the HOTP algorithm from RFC 4226. When you enable 2FA, the service and your app share a secret key. After that, both sides can calculate the same short code from that secret and the current time, so nothing needs to be sent over the network when you log in. Because each code is valid for only a short window, a stolen code is useless after a few seconds.

How TOTP Codes Are Generated

  1. Count the time steps: The current Unix time is divided by the period (30 seconds by default) and rounded down. This number is the counter.
  2. Calculate an HMAC: The counter, written as 8 bytes, is signed with the secret key using HMAC-SHA-1 (or SHA-256 or SHA-512).
  3. Dynamic truncation: The last 4 bits of the result choose an offset, and 31 bits are taken from that position.
  4. Reduce to digits: That number is taken modulo 10 to the power of the digit count, then padded with leading zeros, giving a code such as 007081.

This tool runs exactly these steps in your browser using the Web Crypto API, and it matches the test vectors published in RFC 6238.

TOTP Settings Explained

SettingCommon valueWhat it does
AlgorithmSHA-1 (default)The HMAC hash used to calculate the code. SHA-256 and SHA-512 are allowed by RFC 6238 but fewer apps support them.
Digits6 (default)Length of the code. Some services use 8 digits.
Period30 seconds (default)How long each code stays valid before the next one replaces it.
Secret16 to 32 Base32 charactersThe shared key, written with letters A-Z and digits 2-7. Keep it private.

Some authenticator apps ignore custom values and always use SHA-1, 6 digits and 30 seconds, so keep the defaults unless your service requires something else.

The otpauth:// Link Format

The QR code you scan when enabling 2FA is just an otpauth:// link. Pasting it into the secret field fills in every setting automatically.

PartExampleMeaning
Scheme and typeotpauth://totp/Marks the link as a time-based one-time password
LabelExample:you@example.comIssuer and account name shown in the app
secretJBSWY3DPEHPK3PXPThe Base32 shared secret (required)
issuerExampleThe service name (recommended)
algorithmSHA1SHA1, SHA256 or SHA512
digits6Length of the code
period30Seconds per code

TOTP vs HOTP vs SMS vs Passkeys

MethodHow the code is madeWorks offline?Main weakness
TOTPSecret key + current timeYesPhishing and a stolen secret
HOTPSecret key + counterYesCounters can drift out of sync
SMS codesSent by the service over the phone networkNoSIM swapping and interception
Passkeys / security keysPublic-key cryptographyYesNeeds support from the service

TOTP is a big step up from a password alone and from SMS codes, but it can still be phished if you type a code into a fake site. Passkeys and hardware security keys resist phishing better where they are supported.

Common Uses for an Online TOTP Generator

Use caseHow the TOTP authenticator helps
Developers testing 2FAGenerate valid codes to test login flows without picking up a phone.
QA and automationCheck that your server accepts codes and handles time drift correctly.
Backup accessRegenerate a code from a saved secret key if your phone is unavailable.
Setting up new appsCreate a secret and QR code for an app you are building.
LearningSee how time-based one-time passwords change and how the settings affect them.

Why Is My 2FA Code Not Working?

  • Wrong device clock: TOTP depends on accurate time. Turn on automatic date and time on your device. The page shows your UTC time to help you compare.
  • Typo in the secret: Only the letters A-Z and the digits 2-7 are valid. Spaces and dashes are ignored.
  • Different settings: The algorithm, digits and period must match what the service uses.
  • Code expired: Type the code before the countdown ends, or wait for the next one.
  • Wrong account: Each account has its own secret, so make sure you are using the right one.
  • Server-side drift: If your own server rejects valid codes, allow one step of drift and check the server clock.

Two-Factor Authentication Best Practices

  • Save your backup codes: Store them offline so you can recover your account if you lose your device.
  • Keep secrets out of screenshots: A screenshot of a QR code or secret key gives full access to your codes.
  • Use a password manager: Many can store TOTP secrets securely and back them up.
  • Prefer app-based or key-based 2FA over SMS: Where a service allows it, choose an authenticator app, passkey or security key.
  • Use a strong password too: 2FA adds a layer but does not replace a good password.

Test a password with our password strength checker.

Is It Safe to Use an Online Authenticator?

This page runs locally: your secret is used inside your browser to calculate codes and is never sent to our server, stored in cookies or saved in local storage. You can confirm that in your browser’s network tab. Even so, a TOTP secret is as sensitive as a password. Only paste real secrets on a device you trust, avoid shared computers, and close the tab afterwards. For your most important accounts, a dedicated authenticator app or hardware key on your own phone is the safer everyday choice, and this tool is best for testing, development and emergency backup.

Limits of This Tool

The tool supports time-based codes (TOTP) only, not counter-based HOTP, push approvals or Steam Guard style codes. It does not save accounts, so you need the secret each time. It relies on your device clock, and it cannot recover a lost secret or reset 2FA on a service. The QR code uses the standard otpauth:// format, but some apps ignore non-default algorithm, digit and period values.

More Free Security and Developer Tools

Check a password with the password strength checker. Inspect tokens with the JWT decoder. Browse all free online tools for security, developers, SEO, writing, PDF and image work.

ADVERTISEMENT
Demo Ad In-article
COMMON QUESTIONS

Frequently Asked Questions About TOTP and 2FA Codes

Short answers about authenticator codes, secret keys and how this tool works.

What is a TOTP authenticator?

A TOTP (time-based one-time password) authenticator creates a short code, usually 6 digits, from a shared secret key and the current time. The code changes every 30 seconds and is used as the second step of two-factor authentication (2FA).

Is it safe to enter my 2FA secret key here?

The secret is processed in your browser with the Web Crypto API and is never sent to our server or saved, and you can check this in your network tab. Still, a secret key is as powerful as your authenticator app, so for important accounts use a dedicated app on your phone and use this page for testing, learning and backups on a trusted device.

Where do I find the secret key for an account?

When you turn on 2FA, most services show a QR code and a link such as "Can't scan the code?" or "Enter setup key manually". That text is the Base32 secret. You can also paste the full otpauth:// link into the secret field and the tool fills in the settings for you.

Why is my code invalid or different from my app?

The most common cause is a wrong device clock, because TOTP depends on accurate time. Also check that the secret is typed correctly and that the algorithm, digits and period match your service. Use the Verify tab with a time drift of one step to see whether the clock is slightly off.

What is the difference between TOTP and SMS codes?

TOTP codes are generated on your device from a secret and the time, so they work offline and cannot be intercepted on the phone network. SMS codes travel over the mobile network and can be exposed by SIM swapping, which is why authenticator apps are generally considered stronger.

Can I use this instead of Google Authenticator?

It produces the same codes as any standard TOTP app when the settings match, so it works as a backup or for testing. It does not store your accounts, though, so each visit needs the secret again. For daily use, a dedicated authenticator app or password manager is more convenient and safer.

What do the algorithm, digits and period settings mean?

They define how the code is calculated. Nearly every service uses SHA-1, 6 digits and a 30-second period, which are the defaults here. Only change them if your service or the otpauth:// link specifies different values, otherwise the codes will not match.

ADVERTISEMENT
Demo Ad 970 x 250

All Tools, One Place

Merge, split, compress and convert files in seconds. Explore powerful free tools for all your everyday needs.

Explore All Tools →