devpocket.dev

2FA / TOTP Code Generator

Generate 2FA codes from a TOTP/HOTP secret, create new secrets with QR codes, and decode otpauth links.

Runs locally
Loading tool…

How to use

  • Get a code: paste the Base32 secret (the "manual entry" key a site shows next to its QR code), or paste a full otpauth:// link. The current code refreshes every period; previous and next codes help when clocks drift.
  • Set up 2FA for your own app: click New secret, fill in issuer and account, and scan the QR code with any authenticator app.
  • Advanced: switch to HOTP for counter-based codes, or change algorithm, digits and period to match a non-standard server.

Codes follow RFC 6238 (TOTP) and RFC 4226 (HOTP) and are computed with the browser's Web Crypto API.

FAQ

Is it safe to paste my 2FA secret here?

The secret stays in this tab’s memory: it is not saved to storage, not put in the URL and not sent anywhere. Still, treat real production secrets with care and prefer a dedicated authenticator app for daily logins.

Why does my code not match the server?

Usually the device clock is off, or the server uses a non-default algorithm, digit count or period. Check the previous/next codes and the settings encoded in the otpauth link.

What is the difference between TOTP and HOTP?

TOTP derives the code from the current time (usually every 30 seconds). HOTP derives it from a counter that increases each time a code is used.

Related tools