Docelora
ToolsAboutContact
Security tools

TOTP Code Generator

Check a two-factor authentication setup, debug a TOTP integration or read a code from a backup secret – the same six-digit codes as Google Authenticator and similar apps.

Quick answer: paste the Base32 secret (or the otpauth:// link from the QR code) and the current code appears with a countdown. Change digits, period or algorithm if your service uses non-standard settings.

TOTP Code Generator

RFC 6238 · 6 or 8 digits · SHA-1/256/512

Private: runs entirely in your browser. Nothing you type or paste is uploaded or stored.

How the code is made

1. Time stepCurrent Unix time ÷ 30, rounded down.
2. HMACThe time step is signed with your secret using HMAC-SHA-1.
3. TruncateFour bytes of the signature become a number; its last 6 digits are the code.

Related tools

Frequently asked questions

What is TOTP?

A time-based one-time password: a code calculated from a shared secret and the current time, changing every 30 seconds. It is defined in RFC 6238.

Is it the same as Google Authenticator?

Yes – with the same secret and settings, the codes match those apps.

Where do I find the secret?

When you set up two-factor authentication, services show a QR code and usually a text key; the QR code contains an otpauth:// link with the secret.

Why do my codes not match?

Check your device clock is correct, and that digits, period and algorithm match the service.

Is it safe to paste my secret here?

It is processed only in your browser, but anyone who has the secret can generate your codes. Only paste secrets on a device you trust, and never share them.

Can I use this as my authenticator app?

It is meant for testing and backup checks; a dedicated authenticator app keeps secrets encrypted on your device.

What is the countdown?

Seconds until the code changes.

What does the otpauth link contain?

The issuer, account, secret and optional settings such as digits and period.

Does it support HOTP?

No, only time-based codes.

Does it need internet?

No – only an accurate clock.

Is it free?

Yes – no sign-up, no usage limits and no adverts inside the tool.

Do I need to install anything?

No. It runs in any modern browser on a phone, tablet or computer.

Is my text uploaded?

No. Everything is processed by JavaScript in this browser tab; nothing you enter is sent to Docelora.

Does it work on a phone?

Yes – the layout adapts to small screens and the buttons are sized for touch.

Can I copy the result?

Yes – use the Copy button under the result box, or select the text.

Does it work offline?

Once the page has loaded, the tool keeps working without a connection.

Which browsers are supported?

Current versions of Chrome, Edge, Firefox, Safari and Samsung Internet.

Is there a size limit?

Very large inputs are limited to keep your browser responsive; the limit is shown if you reach it.

Do I need an account?

No – open the page and use it.

Can I use the results commercially?

Yes – what you create is yours to use.

Last reviewed: 14 November 2026.