Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsTOTP Generator and Tester
EnglishEspañolPolski

TOTP Generator and Tester

dev

Live authenticator codes from a secret, a QR code for your app, and a code tester

Runs in your browser. Nothing you type is sent anywhere. Updated on 25 Oct 2026.

An authenticator code comes from a shared secret and the clock, which is why it changes every 30 seconds. Paste a secret to watch live codes, get a QR code to add it to your phone, or test a code you were given. The secret stays local.

Next:
  • Password Generator Strong random passwords and memorable passphrases, generated on your device
  • Base32 and Base58 Encoder and Decoder Encode or decode Base32 (RFC 4648, hex, Crockford) and Base58 for text or hex bytes

How to generate and test TOTP codes

1

Paste a Base32 secret or an otpauth:// link into the Secret box, or press New secret for a random one.

2

Set Algorithm, Digits and Period to match the service; most use SHA-1, 6 digits and 30 s.

3

Read the Current code beside the countdown ring, with the Previous and Next codes below it.

4

Type a code into Test a code, choose the Drift allowance, and read Valid or Not valid.

About the TOTP Generator and Tester

This TOTP generator shows the live one-time code for a secret, with a ring counting down to the next code and the previous and next codes beside it. It builds the otpauth link and QR code that Google Authenticator, Microsoft Authenticator, Authy and password managers scan, and it tests whether a code you type is valid right now.

Developers use it while building two-factor login: generate a secret, scan it into a phone, and check that the server accepts the same codes the page shows. Support teams use the tester to see whether a user's code is simply late, because a code from the previous window means the phone clock is behind. It also reads an otpauth link pasted from a password manager export.

Codes follow RFC 6238 with a 30 or 60 second period, 6 or 8 digits and SHA-1, SHA-256 or SHA-512. Most apps only support the default of SHA-1, six digits and 30 seconds, so change those only if your server expects it. The tester allows a chosen drift of zero, one or two steps either side and tells you which step matched.

Everything runs in your browser with the Web Crypto API and the page's own clock, so the codes are only as right as your device time. Secrets are never sent, logged or saved; only your period, digits and algorithm are remembered. The QR code is drawn on the page and not fetched from any service.

Treat a real account's secret like its password: anyone who has it can make valid codes. Use generated test secrets for development. Related tools: HMAC Generator, Password Generator.

Frequently asked questions

How do I get a TOTP code from a secret key?

Paste the Base32 secret, the string of letters A to Z and digits 2 to 7 a site shows under its QR code, into the Secret box. The current code appears straight away with a countdown. Spaces and lower case are fine. If you have an otpauth:// link instead, paste that and the settings are filled in from it.

Is it safe to paste my 2FA secret here?

The secret never leaves this page: codes are calculated in your browser and nothing is sent, logged or stored. Still, anyone with the secret can generate your codes, so only paste a real account's secret on a device you trust, and prefer generated test secrets while developing.

Why is my authenticator code rejected?

The most common cause is clock drift: codes depend on the time, so a phone or server a minute off produces codes the other side does not expect. Use the tester to see whether the code matches the previous or next window. Other causes are a mistyped secret or an algorithm, digit count or period that differs from the server.

What is drift tolerance?

Servers usually accept codes from one step before and after the current one, so a code typed a few seconds late or from a slightly wrong clock still works. The tester lets you allow 0, 1 or 2 steps either side and reports which step matched, which tells you roughly how far off the clock is.

Do authenticator apps support SHA-256, 8 digits or 60 seconds?

Many do not. Google Authenticator historically ignored those settings and used SHA-1, six digits and 30 seconds regardless, which gives wrong codes. Microsoft Authenticator, Authy and most password managers vary. Use the defaults unless you control both sides, and scan the QR code here to check your app's codes match.

What is the difference between TOTP and HOTP?

HOTP (RFC 4226) makes a new code each time a counter goes up, usually when a button is pressed. TOTP (RFC 6238) replaces the counter with the current time divided into 30 or 60 second steps, so codes expire on their own. Almost all authenticator apps use TOTP; this tool generates and tests TOTP only.

Still stuck? Ask about TOTP Generator and Tester and anybody who knows can answer. No account needed.

Common uses

  • 2FA Code GeneratorGet the current two-factor code from a setup key, without a phone
  • OTP GeneratorTime-based one-time passwords with 6 or 8 digits and a choice of algorithm

On the related tools: CSP Validator – Find typos, missing semicolons and invalid sources in a Content-Security-Policy · JWT Decoder – Paste a token to read its header, payload and expiry · Passphrase Generator – Three to ten random words you can actually remember.

Read about this

All guides
  • How a TOTP code comes from a setup key and the time, worked through step by stepA 2FA code is HMAC-SHA1 of the setup key and the 30-second step, cut to 6 digits. The RFC 6238 test key at 59 seconds gives 287082, worked out here.

Related tools

All developer tools
CSP EvaluatorCheck a Content-Security-Policy directive by directive and see how scripts get past itWebRTC Leak TestSee which IP addresses WebRTC hands to websites, and whether your VPN is being bypassedBrowser and Device InfoSee what any website can read about your browser and device, and copy it for supportJWT Decoder, Verifier & EncoderDecode any JWT, verify its signature, and sign new tokens, all in your browserPassword GeneratorStrong random passwords and memorable passphrases, generated on your devicePassword Strength CheckerHow long your password would survive an attack, and exactly what makes it weakHMAC GeneratorHMAC-SHA1, SHA-256, SHA-384 and SHA-512 of text or a file, and signature checksBcrypt Hash and VerifyHash a password with bcrypt at cost 4 to 14, or check a password against a hash

In the collection Security Tools for Developers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
EnglishEspañolPolski
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)