The Short Answer
A 2FA QR code is a visual encoding of a small piece of text — typically under 200 characters — formatted as a standardized otpauth:// URI. Scanning it with an authenticator app or a browser-based tool like AuthBro simply reads that text out of the image and parses it into your account setup: your secret key plus a few labels for display purposes. There's no hidden data, no external lookup, and no network request involved in the scan itself — everything needed is already encoded directly in the pattern of black and white squares.
The Exact Format Behind the Code
Almost every 2FA QR code follows this structure, defined informally by Google Authenticator's own Key URI Format documentation and now treated as a de facto industry standard:
otpauth://totp/ServiceName:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=ServiceName&algorithm=SHA1&digits=6&period=30
Breaking this down piece by piece:
| Component | Meaning |
|---|---|
totp | Indicates this account uses time-based codes (as opposed to hotp, counter-based) |
ServiceName:[email protected] | The label shown in your authenticator's list — typically the service name and your account identifier |
secret= | Your Base32-encoded secret key — the only value that actually matters cryptographically |
issuer= | Metadata used for display and icon matching in supporting apps |
algorithm= | The hash function used, almost always SHA1 for broad compatibility |
digits= | Code length, almost universally 6 |
period= | Time-step duration in seconds, almost universally 30 |
Everything except secret is essentially cosmetic — it affects how the entry is labeled and displayed, not the actual security of the codes generated. For the deeper mechanics of how that secret becomes a six-digit code every 30 seconds, see How TOTP Works Under the Hood.
Why Base32 and Not Something More Compact
The secret itself is encoded in Base32 rather than a more space-efficient format specifically so it can also be typed manually as a fallback if scanning isn't possible. For the full reasoning behind this specific encoding choice, see Understanding Secret Keys, Base32 Encoding, and Time Drift in TOTP.
What a QR Code Does Not Contain
It's worth being explicit about the boundaries here, since misconceptions are common:
- No password. The QR code has nothing to do with your account password — it exists purely to set up the second factor.
- No ongoing connection to the service. Once scanned, the authenticator doesn't need to contact the service again to generate future codes.
- No personal data beyond what's visibly encoded. There's no hidden tracking payload — what you see decoded as plain text is genuinely everything present in the image.
Why This Is Shown Only Once
Services generally display the QR code (and its underlying secret) exactly once, at the moment of setup, and never again afterward. This isn't a UI limitation — it's a deliberate security choice: repeatedly displaying a value this sensitive would create more opportunities for it to be captured by anyone glancing at the screen, a screenshot, or a screen-recording. This is also precisely why losing your authenticator without a saved backup is a real problem rather than a minor inconvenience — the secret genuinely can't be retrieved from the service a second time. See Lost or Expired 2FA QR Code? What to Do for what your options actually are if this happens.
A 2FA QR code isn't magic — it's a compact, standardized way of transmitting one piece of critical data (your secret key) plus a few cosmetic labels, all in a format a camera can read in under a second.
