// No account · No expiry · 100% client‑side

Free 2FA / OTP QR Code Generator

Build an otpauth:// QR code for TOTP or HOTP authenticator apps in your browser. Free. Learn why non-default settings can silently lock users out.

50QR code types
61Frame styles
6File formats
1 Complete the content
The secret is encoded straight into the code — everything stays in your browser, but treat the finished QR like a password.
2 Design your QR
Shape style
Border style
Center style
3 Download your QR
Example preview

Example QR code preview shown. Enter content to create your code.

Excellent
High contrast and optimal density. 100/100
px
px

Need to change it after printing? Make a dynamic QR code

No recent history found. Create and download a QR code to see it here.

A 2FA QR code is a QR code that contains an otpauth:// link, which authenticator apps read to enroll an account: the link holds the account label, the shared secret key, and settings such as the number of digits and the refresh period. This generator builds that link in your browser. The secret is not uploaded, but it is inside the finished image, so the image is as sensitive as a password.

When would you need this?

  • Developers testing an enrollment flow for their own service.
  • Administrators provisioning tokens where a secret already exists in a system they control.
  • Individuals re-creating an enrollment code from a secret key they saved when they first set up an account.

If a website offers you a QR code to set up two-factor authentication, use that one. Do not invent your own secret for an account: the service must know the same secret to verify your codes.

How do you make a 2FA QR code?

  1. Pick Time-based (TOTP), the usual choice, or Counter-based (HOTP).
  2. Enter the Issuer / Service and the Account Name that the app should display.
  3. Paste the Secret Key in Base32. Spaces are removed and letters uppercased.
  4. Leave the advanced options at their defaults unless your system requires otherwise.
  5. Scan with the app and check that the account appears with the codes your server expects.

With the defaults (SHA1, 6 digits, 30 seconds) and the placeholder secret, the code holds:

otpauth://totp/ACME%20Corp%3Ajane%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=ACME+Corp

Changing algorithm, digits, and period adds parameters to the link:

otpauth://totp/ACME%20Corp%3Ajane%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=ACME+Corp&algorithm=SHA256&digits=8&period=60

Why should you leave the defaults alone?

Google's own Key URI Format page states that Google Authenticator ignores the algorithm and period parameters, and that on Android and BlackBerry it ignores digits. If you build a code with SHA256, 8 digits, or a 60-second period and someone scans it in an app that ignores those settings, the app will compute codes with SHA1, 6 digits, and 30 seconds. They will never match your server, and the user will think the code is broken.

Other authenticator apps may honor the extra parameters, but that is a per-app fact you need to test. The safe rule: use the defaults for any code that ordinary users will scan, and use custom values only in a controlled setup where you know the app.

What is inside the link?

PartMeaning
totp or hotpTime-based or counter-based codes. HOTP links also carry counter=0
Label (Issuer:account)What the app shows in its list
secretThe Base32 shared key. Google's format page says padding is not required and should be omitted
issuerThe service name, repeated as a parameter so newer apps display it correctly

How do you handle the secret safely?

  • Treat the PNG or SVG like a password. Anyone with the image can generate your codes.
  • Do not email it, paste it into chat, or leave it on a shared screen. Do not store it in a cloud photo library that syncs.
  • Delete the image after enrollment, and keep the secret in a password manager if you need a backup.
  • Use a computer you trust. The generator runs locally, but a compromised device can still read the screen.

For how these codes fit in a wider account-security picture, see Google 2FA QR codes, and for the risk of QR codes generally, can QR codes be hacked?

How do you test it?

Scan with the actual app your users will use, then compare the six-digit code against one your server computes for the same time. If they differ, the parameters or the secret are wrong. Check the export with the QR validator. For screenshots you must share, use a throwaway secret.

References

// FAQ

Frequently Asked Questions

Clear, direct answers to common questions about generating and deploying QR codes.

Rarely. If a website offers a setup QR code, use it, because the service must know the same secret. This tool suits developers testing enrollment, admins provisioning tokens from a known secret, and people recreating a code from a secret they saved.

Google's Key Uri Format page says Google Authenticator ignores the algorithm and period parameters, and ignores digits on Android and BlackBerry. A code built with SHA256, 8 digits, or 60 seconds would then produce codes that never match your server.

Base32. Google's format page says padding is not required and should be omitted. The generator uppercases letters and removes spaces.

TOTP, time-based, is the usual choice. HOTP is counter-based, and its link carries counter=0.

The secret stays in your browser, but the finished image contains it. Treat the image like a password: do not email it, sync it to a cloud photo library, or leave it on a shared screen, and delete it after enrollment.