Cover illustration for the article “How to Make a QR Code for a Google Drive File or Folder”
Guides

How to Make a QR Code for a Google Drive File or Folder

7 min read
Create a QR code

To make a QR code for a Google Drive file or folder, open its Share dialog, set General access to "Anyone with the link" with the Viewer role, click Copy link, and turn that link into a QR code. Then open the link in a private browser window to confirm it loads without signing in. When a Drive QR code fails, the cause is almost always sharing, not the code.

Set sharing before you make the code

A QR code only carries the address. Whether a stranger's phone can open what sits behind it is decided by Drive's sharing settings, so fix those first. The steps below follow Google's Drive sharing help, checked in November 2026 on drive.google.com in a desktop browser.

  1. Select the file or folder and click "Share".
  2. Under "General access", open the drop-down.
  3. Choose "Anyone with the link". The other choices are "Restricted" and, on work or school accounts, your organisation.
  4. Set the role to Viewer, click "Copy link", then "Done".
  5. Paste the link into a QR generator and scan the result with a phone.

The Anyone with the link setting is the one that matters for print. Google describes it this way: "Anyone on the internet who has the link can open the file without signing in to a Google Account." Restricted means "only people who have been given access can open the file", which on a poster means nobody.

Keep the role at Viewer. A link with the Editor role hands every scanner the right to change the file, and Google notes that "Editors can also change permissions and share items with others by default." A code on a noticeboard is a link given to everyone who walks past.

Why scanners see "You need access"

"You need access" is Google's wording for a permission refusal. According to Google's help page on access to files, the message "means you don't have permission to view the file". The page lists three causes, and each one shows up with QR codes.

What the scanner seesLikely causeFix
"You need access" with a Request access buttonGeneral access is still RestrictedSwitch to Anyone with the link, Viewer
Works for you, fails for everyone elseYou tested on a phone already signed in as the ownerTest in a private window, or on a phone with no Google account signed in
Works for colleagues, fails for the publicSharing is limited to your organisation, or the admin blocks external sharingSee the work and school section below
Sign-in page instead of the fileThe scanner is signed in to a different Google account than the one invitedUse link sharing so no account is needed

That second row catches most people. The owner scans the code, the file opens, and the print order goes out. Every visitor then lands on the access page, because the owner's phone was signed in all along. Each visitor who taps Request access also sends the owner a request, so a Restricted poster collects access requests from strangers.

Work and school accounts add a second lock

On a Google Workspace account, your administrator's settings sit above your own. Google's sharing help says it directly: "If you use a work or school account, your administrator may restrict external link sharing." When that happens, the Anyone with the link option may be missing, or only your organisation's option may be offered. A code made from that link opens for colleagues who are signed in and fails for everyone outside.

Admins control this in the Admin console under Apps, then Google Workspace, then Drive and Docs, then Sharing settings. Google's external sharing admin guide adds a detail that matters for printed codes: if an admin turns external sharing off, "External users also lose access to any items previously shared with them." A code that worked for a year can fail overnight after a policy change you were never told about, and Google says setting changes can take up to 24 hours to apply. The default for new files is stricter still: "By default, general access is set to Restricted."

Personal Gmail accounts have no admin layer, so the owner's own setting is final. If a code on a work account must reach the public, ask IT before printing. Hosting the file outside Drive is the other route.

Link to the file or to the folder

A file link opens one document in Google's viewer, and a folder link opens a list of everything inside. Folders make sense for a press kit, a photo set or several language versions. The trade-off is inheritance. Google's help says that "when you share a folder, all files and subfolders inside it inherit those same sharing permissions". Anything dropped into that folder later becomes public too, including a draft added by a colleague who never saw the poster.

Copy the link from the Share dialog rather than the address bar. In 2021 Google added "a resource key to sharing links" for some older Drive files, enforced from 13 September 2021, according to the Google Workspace Updates blog. People who had already opened those files kept access; anyone new needed the link with the key. Codes printed before that change can fail for first-time scanners for this reason alone.

You will also find forum tricks that rewrite a Drive link to force a download or a copy. They are not documented in Google's help centre, so they can change without notice. The standard share link is the one Google supports.

Moving, renaming and replacing the file

The address in a Drive link is built on the file's ID, and Google's Drive API documentation says that "File IDs are stable throughout the life of the file, even if the file name changes." Renaming is safe. A move keeps the same file and so the same ID, but it can change who is let in. Google's admin help on shared folders says that when content leaves a shared folder, "any permissions that the moved content inherited from the shared folder are removed." Moving a file into a shared drive works the same way: "File permissions inherited from folders aren't copied." Sharing set directly on the file survives. Sharing it got from its old folder does not.

Replacing the file is where most printed Drive codes die. Deleting the PDF and uploading a corrected one creates a new file with a new ID, and the old code now points at nothing. For an uploaded file such as a PDF, open More, then File information, then Manage versions, and click "Upload new version". The replacement then takes the same file's place, so the existing link serves the new version. Google warns that an old version "might be permanently deleted after 30 days or if there are 100 newer versions", unless you mark it Keep forever. Native Google Docs, Sheets and Slides files work differently: you edit them in place and the link never changes, while version history keeps the earlier states.

When Drive is the wrong host

Drive suits short-lived, low-stakes codes, such as a worksheet for this week's class or a document for a meeting. It is a weak host for anything printed in volume or kept for years. Ownership, admin policy and folder structure can all break the link without anyone touching the code, and Drive gives you no count of how many people scanned it. Our guide to why cloud-drive links rot covers file size and mobile loading too.

For a long-lived code, a dynamic QR code points at a redirect you control, so you can move the file and update the destination without reprinting. A PDF QR code generator or a file QR code hosts the document behind the code, and in QRolling you can build and style the code free with no login, while downloading it needs an account that starts with a 7-day trial and no card. Whichever host you choose, open the link signed out before printing.

Frequently asked questions

Can I see who opened my Drive file from the QR code? Not by name. Google's help says people who view a link-shared file without signing in appear as anonymous animals rather than named users, and Drive does not count scans.

Will the code stop working if I stop sharing the file? Yes, immediately for anyone not invited by name. Switching General access back to Restricted is also the quickest way to retire a code you can no longer reprint.

How do I make a QR code for a Google Form stored in Drive? Use the form's own responder link, not the Drive share link. The Google Form QR code guide shows how to copy it and test it.

Share this article