2FA QR Code Generator
Build an otpauth:// URI and QR code for TOTP or HOTP from issuer, account and Base32 secret. Scan it with Google Authenticator, Authy or 1Password.
The key shown by the service when you set up 2FA. Spaces and lowercase are fine.
Enter an account name to build the QR code.
Follows the Google Authenticator Key URI format and works with Google Authenticator, Microsoft Authenticator, Authy, 1Password, Bitwarden and others. The QR code is generated locally. Anyone who sees it can generate your codes, so do not share screenshots of it.
Runs entirely in your browser. Your data is never uploaded.
What is 2FA QR Code Generator?
This tool creates the otpauth:// key URI and its QR code that authenticator apps scan when you set up two-factor authentication. Enter the issuer, account name and secret, adjust algorithm, digits and period or counter, then scan or download the QR code.
How to use 2FA QR Code Generator
- Choose the Type: TOTP (time-based) or HOTP (counter-based).
- Enter the Issuer and Account name.
- Paste a Secret key (Base32) or click New random secret.
- Adjust algorithm, digits and period/counter, then scan the QR code or click Download PNG.
Example
Issuer ACME Co, account john@example.com, secret JBSWY3DPEHPK3PXP
otpauth://totp/ACME%20Co:john%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30
When to use 2FA QR Code Generator
Use it to enrol test accounts during development, move a known secret into a new authenticator app, or create QR codes for documentation. Never share a QR code for a real account; it contains the secret.
How 2FA QR Code Generator works
The URI follows the Google Authenticator Key URI format: otpauth://totp/Issuer:account?secret=…&issuer=…&algorithm=SHA1&digits=6&period=30, with issuer and account percent-encoded. The QR code is generated locally with the qrcode library (error correction level M) as a PNG data URL. Random secrets are 20 bytes (160 bits) from crypto.getRandomValues, as RFC 4226 recommends.
Common Use Cases
- Creating QR codes for 2FA test accounts
- Moving a TOTP secret to a new phone
- Generating documentation screenshots with dummy secrets
- Testing how authenticator apps handle SHA-256 or 8-digit codes
Security Note
Anyone who scans or photographs the QR code can generate your one-time codes. Do not share screenshots of real 2FA QR codes.
FAQs
Do all apps support SHA-256 and 8 digits?
No. Google Authenticator historically ignores algorithm and digits on some platforms; SHA-1, 6 digits, 30 seconds is the most compatible choice.
Why can't the issuer contain a colon?
The colon separates issuer and account in the URI label, so a colon inside either would make the label ambiguous.
Is the QR code generated online?
No. The URI and QR image are created in your browser; nothing is sent to a server.