Skip to main content

TOTP Code Generator

Developer

TOTP is a shared secret plus the current time slice: both sides compute the same six digits, and the code expires every 30 seconds. Use this page to check whether a secret produces the codes your server expects, to debug a two-factor implementation, or to enrol a device by scanning the generated QR code.

Loading tool…

How to use

4 steps
  1. 01

    Paste the base32 secret your service showed under “manual entry” — case, spaces and trailing `=` are ignored.

  2. 02

    The code refreshes every second; the badge shows seconds left and the bar shows progress through the window.

  3. 03

    Scan the QR code with Google Authenticator, 1Password or Aegis to enrol a device.

  4. 04

    No secret at hand? Press New secret to generate 20 random bytes and test your server implementation.

Technical Notes & Guide

1

Why clock skew breaks TOTP first

The only inputs are the secret, the 30-second time counter and HMAC (SHA-1 by default). Client and server agree only if they slice time the same way, so a device 30 seconds off produces codes that never validate. When “the code is always wrong”, check automatic time sync before anything else, then server NTP.

FAQ

2 questions
Q1Can this bypass someone's two-factor authentication?

No. Codes require the secret, which is issued once at enrolment. Without it, any number of observed codes cannot be reversed — which is exactly why a leaked secret equals a broken second factor.

Q2Is the secret stored?

No. Everything is computed in memory; nothing is uploaded or written to localStorage, and a refresh clears it.

Developer