Security ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Security Tools

TOTP Authenticator Code Generator

Generate live TOTP codes from a Base32 secret or otpauth:// link with SHA-1, SHA-256 or SHA-512, 6 to 8 digits and any period. Shows next and previous codes.

View all tools
ResultUpdates as you type

The result appears here as soon as the page has loaded.

How to use TOTP Authenticator Code Generator

Paste a Base32 secret, or the otpauth://totp/ link from a QR code, on a trusted device. Check the digits, period and algorithm match the service; the code refreshes every second. Enter a Unix time to calculate the code for a fixed moment.

  1. Enter the secretPaste a Base32 secret, or an otpauth://totp/ link to read its settings automatically.
  2. Match the settingsChoose the digits, period and algorithm the service uses; 6 digits, 30 seconds and SHA-1 is typical.
  3. Use the codeRead the current code and countdown, and compare the previous and next codes to spot clock drift.

TOTP combines a secret with the time

Both the authenticator and the server divide the current Unix time by the period to get a time step, sign it with the shared secret using HMAC and reduce the result to six to eight digits. The secret, clock, algorithm, digits and period must all match. The default secret is the RFC 6238 test key: with the Unix time set to 59 and 8 digits it gives 94287082, matching the published test vector, which makes the tool handy for checking your own implementation.

Protect the shared secret

A code expires within seconds, but the Base32 secret keeps producing valid codes, so anyone who has it has your second factor. This page calculates codes with the Web Crypto API in your browser; the secret is never uploaded and the page offers no share link, so it can't end up in a URL. Even so, only enter real secrets on a device you trust. Secrets shorter than 128 bits are flagged, as RFC 4226 requires at least that.

Accuracy and data handling

A format or strength result covers only the checks shown here and does not replace a full security review or secure key management. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

Why does the code change?

The code is derived from the secret and a counter based on the current time. A new counter starts when the period ends, usually every 30 seconds.

Why does my authenticator show a different code?

Check the device clock first, then the Base32 secret, algorithm, digits and period. Both sides must use identical settings.

Can I paste the link from a QR code?

Yes. Paste an otpauth://totp/ link and the secret, algorithm, digits, period, issuer and account name are read from it.

Is the secret uploaded?

No. Base32 decoding and the HMAC calculation run in your browser, and the page has no share link, so the secret never appears in a URL.

More Security Tools

Related tools