Google Drive QR code generator

Paste a Drive, Docs, Sheets or Slides link and we rebuild it so the scan opens a clean read only view, or downloads the file, instead of dropping people into the editor.

Use the link from the Share button, or just copy what is in your address bar. We will work out which kind it is.

By QRotto · Updated · 6 min read

Put a Google Docs link straight into a QR code and it will almost certainly end in /edit. That address asks the phone to open the full editor, which on a small screen means a slow load, a sign in prompt for anyone not already logged in, and a document that can be changed by accident.

Drive has other addresses for the same file. This tool pulls the file id out of whatever you paste and rebuilds the link in the form that suits what you actually want to happen.

What each option does

OptionWhat the scanner getsGood for
PreviewA clean read only view, no editing toolbarMenus, handouts, price lists, anything public
DownloadThe file itself, straight to their deviceForms to fill in, files people keep
Open as normalThe standard Drive or editor viewColleagues who are meant to edit it

Preview is the right default for anything printed and pointed at the public. It is the fastest to load, it does not invite editing, and it does not look like a workspace.

The sharing setting that decides everything

No link format can get round permissions. If the file is set to Restricted, every one of these addresses will show a request access screen to anyone outside your organisation, and your printed sign will be useless.

In Drive, open Share, then under General access change Restricted to Anyone with the link, and set the role to Viewer. Viewer matters: with Editor, anyone who scans your poster can change the document.

Test it the way a stranger would. Open a private browsing window, sign out of Google, and paste the link. If you see the document, your sign will work. If you see a request access page, the sharing setting is still wrong, not the QR code.

The code does not hold the file

Worth being plain about, because plenty of tools imply otherwise. A QR code holds at most 2,331 bytes at the common error correction level. A one page PDF is around 25 KB, which is about twelve times over that limit, and a short video is over a thousand times over it.

So a QR code for a Drive file is, and can only be, a link. That has one consequence worth planning for: the code works for exactly as long as the file stays in that Drive at that address. Move it, delete it, or leave the account, and every printed copy breaks. For anything going to print in quantity, point the code at a short address on a domain you own and redirect from there, so you can move the file later without reprinting.

Step 1: set sharing, the step that matters most

By default a Drive file is Restricted, which means only people you have named can open it. A QR code cannot change that. Print a code for a restricted file and everyone who scans it lands on a request access screen, and you will not find out until the posters are on the wall.

  1. Right click the file in Drive and choose Share.
  2. Under General access, change Restricted to Anyone with the link.
  3. Set the role next to it to Viewer.

Viewer, not Editor. If the role is Editor, anyone who scans your poster can change the document, and on a shared menu or price list that is a real problem rather than a theoretical one. Viewer is the correct setting for anything printed in public.

One caveat if you are on a work or school account. Some organisations block Anyone with the link entirely, and the option will be greyed out or limited to your domain. If that is the case, no link format will help and you need the file hosted somewhere else.

Copy the link and look at how it ends. A Google Doc, Sheet or Slides link will end in /edit, usually with ?usp=sharing after it. That address opens the full editor.

On a phone the editor is slow to load, prompts people to sign in, and puts an editing toolbar in front of someone who only wanted to read a menu. Change the ending:

You haveChange it toWhat happens on scan
/edit?usp=sharing/previewClean read only view, no toolbar
/edit/export?format=pdfDownloads as a PDF
A stored file linkdrive.google.com/uc?export=download&id=…Downloads the file itself

For a stored file rather than a Google format document, the file id is the long string between /d/ and /view in the address. Drop it into the download form above if you want the file to save rather than open in Drive's viewer.

What we measured about the link forms

Drive links are long, and long links make denser codes that have to be printed larger. We measured each form with a realistic 33 character file id, at error correction level M:

Three QR codes for the same Google Doc. The edit link is 41 by 41 modules and needs 19.6 mm. The preview link is 37 by 37 and needs 18 mm. A short link on your own domain is 25 by 25 and needs 13.2 mm. All three decoded.
The same document, three addresses. Switching from the editor link to the preview link drops a whole version step, so the code is both friendlier and smaller.
LinkCharsGridSmallest usable print
Google Doc, what you copy (/edit?usp=sharing)8541 x 4119.6 mm
Google Doc, export as PDF8641 x 4119.6 mm
Google Doc, /preview7637 x 3718.0 mm
Drive file, address bar link8237 x 3718.0 mm
Drive file, direct download8037 x 3718.0 mm
A short link on your own domain2525 x 2513.2 mm

The print sizes above are technical minimums for each grid. In print, never go below about 2 cm, the floor our sizing guide sets for any code.

Two things came out of this, and one of them is a correction to advice you will see elsewhere.

Switching to preview does shrink the code. 85 characters to 76 crosses a version boundary, 41 by 41 down to 37 by 37. You get a better experience and a sparser code from the same change.

Deleting ?usp=sharing does not. It saves twelve characters, which sounds useful, but the Drive file link stays at 37 by 37 either way. QR codes grow in fixed steps rather than character by character, so trimming within a step buys you nothing. Tidier, not smaller.

Common questions

Does this work with Google Sheets and Slides?

Yes. Paste any Docs, Sheets, Slides or Drive file link and the tool recognises which it is and offers the right preview address for that type.

Will the person need a Google account?

Not if the file is shared with Anyone with the link. If it is restricted, they will be asked to sign in and then to request access, which is where most of these codes fail.

Can I make the file download instead of opening?

Yes, choose the download option. It uses Drive's direct download address. Note that very large files show a virus scan warning page first, which Drive adds and no link format avoids.

Is my link sent anywhere?

No. The rewriting and the code are both done in your browser. Nothing about your file or your link leaves this page.

Why is my code quite dense?

Drive file ids are long, so these links run to about 60 or 70 characters and the code is busier than a short URL. That matters for small printed sizes. Our sign size guide has the character budget for each print size, and the stress test will tell you how much blur yours survives.

Want the steps written out?

Our guide on creating a QR code for Google Drive walks through the sharing settings, the link rewrite and how to test it signed out, with the measurements behind which link form prints smallest.

For a file hosted somewhere other than Drive, use the file and media generator, or the PDF generator for a PDF. For an ordinary web page, the URL generator is simpler. To put the finished code on a printable sign at the right size, use the sign maker.

QRotto

QRotto builds free browser based QR code generators and writes the guides that go with them. Every generator is verified by decoding the codes it produces and confirming the output matches the input exactly. See our editorial standards.