2FA Code Generator
A local TOTP generator using Web Crypto. Supports otpauth:// URIs, password-style secrets, and previous/next windows for clock skew.
2FA Code Generator
RFC 6238 · local onlyCase-insensitive. Spaces and trailing padding are ignored. The secret never leaves this tab.
Extracts the secret, period, digits, and algorithm from a TOTP setup URI.
New secret — shown once Copy this secret into your authenticator now. It is not stored by this page.
------ Waiting for a secret
Clock drift helpers
- Previous code
- —
- Next code
- —
Clock drift: TOTP codes depend on your device clock. Previous and next codes cover one period
of drift; if codes keep failing, sync your clock.
About 2FA Code Generator
Generate TOTP codes from a Base32 secret with support for SHA-1, SHA-256, SHA-512, and custom periods.
This tool runs locally in your browser. It does not upload your input, require an account, or store your data on a server. If a feature needs a network request, the interface asks before sending anything.