Can You Password-Protect a QR Code?
You can't password-protect a QR code itself, but you can password-protect what it opens: a gated landing page, a restricted Drive file or a OneDrive link.
You can’t password-protect a QR code itself, because a standard QR code has no lock: any scanner reads what’s stored in it. What you can do is password-protect the page or file the code opens. Point the code at a gated landing page, a restricted cloud file or a password-protected sharing link, and the password check happens after the scan.
If the secret is inside the code, it’s not a secret.
Why you can’t password-protect a QR code itself
A standard QR code is an encoding format, not a lock. The format is an ISO standard (ISO/IEC18004), approved in June 2000, and it describes how numeric, alphanumeric, 8-bit byte and kanji data is laid out in the pattern. It says nothing about encryption.
Health passes showed this in practice. One security write-up found those QR codes “encode it, but don’t encrypt it”, so anyone holding the code could see everything in it.
There is a niche exception. The inventor of the QR code describes SQRC as a type of QR code with a “reading restricting function”. It has a public part and a private part, and the private part can be read “only by specific types of scanners”. It looks like a regular code, but it’s built for internal company systems, not for a phone camera, and even its maker says it “does not mean guaranteed securing of coded data.”
How a password-protected QR code actually works
A password-protected QR code is a normal code that opens a page asking for a password before it shows anything. The protection lives on the server behind the link.
The flow looks like this:
- Someone scans the code. Their phone opens a short link.
- The link loads a password page instead of the content.
- If the password is right, the page reveals the file, video or URL.
That’s why the feature only exists on dynamic codes. A static code stores the final URL directly, so there’s nowhere to put a password check. If you’re unsure which kind you have, see dynamic vs static QR codes.
The Wi-Fi QR code trap
A Wi-Fi QR code is the opposite of password-protected: it carries the network password in plain text. The common format looks like WIFI:T:WPA;S:mynetwork;P:mypass;;, where the P field is the password.
Here’s what that means for a café. You tape a Wi-Fi code to the counter. A customer photographs it and decodes it at home. They now have your password in text form, and so does anyone they send the photo to. That’s fine for a guest network. It’s a problem for the network your till runs on.
Our guide to a Wi-Fi QR code sign covers setting one up for guests only.
Free ways to password-protect what a QR code opens
The cheapest way to password-protect a QR code’s destination is to use the sharing controls your files already have. You don’t need a special generator.
Google Drive, for named people. Open Share, go to General access and pick Restricted. Google says that with Restricted, “only people who have been given access can open the file.” Anyone else who scans the code hits a request-access screen. On work and school accounts you can also add an expiration date per person, up to one year out.
OneDrive, for a real password. OneDrive can put a password and an expiry on a sharing link. On personal accounts, Microsoft says this is “Only available to Microsoft 365 subscribers”. On work or school accounts, passwords apply to extra links, not the main one.
Then copy the protected link and make a QR code for it. If you use a dynamic QR code, you can swap the link later, for example when the file moves or you rotate the password.
Which option fits what you’re protecting
The right protection depends on how bad it would be if a stranger saw the content.
| What’s behind the code | Good enough | Why |
|---|---|---|
| A discount or bonus content | A shared password on a gated page | Leaks cost little; the goal is to keep casual scanners out |
| Course or member material | Drive set to Restricted | Each person signs in with their own account |
| A client’s documents | OneDrive or Drive link with sign-in, plus an expiry | Access ends on a date you set |
| Personal, medical or financial data | Don’t use a shared QR code | One photo of the code plus a leaked password exposes it |
| Office Wi-Fi | A separate guest network | The Wi-Fi code carries the password itself |
A shared password tends to leak. It gets written on the same poster as the code, or forwarded in a group chat. Sign-in with a personal account holds up better, because each person needs their own credentials.
What a password doesn’t fix
A password on the destination doesn’t make the QR code private. Anyone can still scan it and read the link.
It also doesn’t stop people sharing the password with the code. And if you rely on a dynamic code, you depend on that service’s redirect servers staying online. QRAnalytica’s dynamic codes run through its redirect servers too, which is what lets you change the link and count scans.
If the goal is to limit how many people get in rather than who, see how to limit QR code scans. To cut off access on a date, read about QR code expiration dates.
My take
Don’t pay for a password toggle. Put the content in Drive or OneDrive with sign-in or a link password, and point a dynamic code at it. You get stronger checks than a shared password, and you can change the destination after printing if something leaks.
Pay for a gated landing page only when your audience doesn’t have accounts and the content is low-stakes, like a bonus video for buyers.
FAQ
Can a QR code be encrypted?
Not a standard one. Any scanner reads what’s stored in a normal QR code. Special variants with a private section exist, but they need specific scanners, so they don’t work with an ordinary phone camera.
Is a password-protected QR code secure?
It’s as secure as the page or file behind it and the password you choose. The code stays public. The protection comes from the login or password check that happens after the scan.
Can I password-protect a QR code for free?
Yes. Put a file in Google Drive with access set to Restricted, or use a OneDrive link with a password if your plan includes it, then make a QR code for that link.
Does a Wi-Fi QR code hide my password?
No. A Wi-Fi QR code stores the network password inside the code, so anyone who scans it, or decodes a photo of it, can read the password.
Can I add a password to a QR code I already printed?
Only if it’s a dynamic code. Change where it points to a protected page or file. A static code’s link is fixed in the pattern, so you’d have to reprint.