Can You Encrypt a QR Code?

A QR code is a data container, not a secure vault. The ISO 18004 standard defines how data is encoded into a module pattern, but it includes no encryption layer. Anyone who scans the code can read the raw payload — a URL, plain text, or vCard data.

Security therefore lives outside the code, at the destination. The QR code simply links to a protected resource; the resource itself enforces access control.

Key Insight

Think of a QR code like a printed hyperlink. The link itself is public — the security comes from what sits behind it (login walls, password pages, token-based access).

Password-Protected Destinations

The most common approach is to point the QR code at a password-gated landing page. When a user scans the code, they see a password prompt before accessing the content.

Implementation Approaches

  • Server-side gate — a simple form that validates a password against a stored hash (bcrypt, Argon2). Best for documents and files.
  • Token in URL — embed a one-time token in the QR URL. The server validates the token and optionally expires it after one use.
  • Third-party link managers — services like Bitly or Rebrandly offer password-protected short links that work as QR destinations.

Avoid Plain-Text Passwords in QR Data

Never encode a password directly into the QR payload (e.g., as plain text). Anyone who scans the code can read it. Passwords belong on the server side, behind an HTTPS connection.

Expiration Dates and Scan Limits

Dynamic QR code services let you set time-based and count-based access controls:

Access control options for dynamic QR codes

ControlHow It WorksUse Case
Expiration dateLink deactivates after a set date/timeEvent tickets, limited-time offers
Scan limitLink deactivates after N scansContest entries, one-time downloads
Geo-fencingLink only works within a geographic areaIn-store promotions, venue-specific content
Device limitOne scan per unique device fingerprintFree trial activations

QRishing — QR Phishing Attacks

QRishing is a social engineering attack where a malicious QR code is placed over a legitimate one (or displayed in a trusted context) to redirect users to a phishing site, malware download, or credential-harvesting page.

Common Attack Vectors

  • Sticker overlays — an attacker places a sticker with a malicious QR code over a legitimate one on a poster or parking meter.
  • Phishing emails — a QR code in an email bypasses link-scanning filters because the URL is encoded in an image, not in clickable text.
  • Fake payment prompts — a code that opens a payment page mimicking a trusted merchant.

Defence for Users

Modern iOS and Android cameras show a URL preview before opening. Always read the domain name. If you do not recognise it, do not tap.

Defence for QR Code Publishers

  • Always use HTTPS URLs — browsers flag HTTP sites as insecure.
  • Use your own domain rather than generic shorteners — brand recognition builds trust.
  • Print QR codes on tamper-evident materials where possible.
  • Monitor scan analytics for unexpected spikes in traffic from unusual locations.

WiFi QR Codes and WPA3

WiFi QR codes encode the network name (SSID), security type, and password in a standardWIFI: format. The password is included in the payload and transmitted to the scanning device — so the QR code effectively shares the password.

For guest networks, this is convenient and secure enough. For sensitive networks, consider:

  • Using a separate guest VLAN with bandwidth limits.
  • Rotating the password periodically and regenerating the QR code.
  • Upgrading to WPA3, which provides stronger encryption and forward secrecy.

Did You Know?

WPA3-Personal uses Simultaneous Authentication of Equals (SAE) instead of the pre-shared key exchange in WPA2. Even if an attacker captures the handshake, they cannot brute-force the password offline — a significant security improvement.

Best Practices Summary

Security checklist for QR code deployment

PracticeWhy It Matters
Use HTTPS URLsEncrypted transport; browser trust indicators
Preview before scanningCatches QRishing attempts
Password-gate sensitive contentAdds an access control layer
Set expiration on dynamic codesLimits exposure window
Use your own domainBrand trust; easier monitoring
Test on multiple devicesEnsures consistent behaviour

Create a secure QR code

Free forever — no signup required. Download in PNG, SVG, and PDF.