Skip to content
StylQR home
QR Code Tutorials

How to Create a QR Code for Documents

Share a document with a QR code: put the file on Google Drive, Dropbox or your site, set the sharing right, and make a code that opens it on any phone.

By StylQR Editorial TeamPublished 5 min read

StylQR blog cover: How to Create a QR Code for Documents, illustrated with a document with a cloud, a folder and a link on a violet background
Table of contents

To make a QR code for a document, put the file somewhere online, such as Google Drive, Dropbox or your own website, set it so anyone with the link can view it, and create a QR code from that link. Scanning opens the document in the phone's browser or app. The code holds the link, not the file, so the file must stay online at that address.

This guide walks through each storage option, the sharing settings that trip most people up, and how to make and test the code on StylQR.

How a document QR code works

A QR code can store at most 2,953 bytes of data, according to Denso Wave's specification summary. That's a few pages of plain text at best, and far denser than any phone would scan comfortably. So a document code stores a short link, and the phone opens the file from wherever it's hosted.

StylQR doesn't host files. You choose where the document lives, which also means you keep control of it. For the full limits on what fits inside a pattern, see how much information a QR code can store.

Option 1: Google Drive

Google Drive is the easiest choice if you don't have a website. It works for Google Docs, Sheets and Slides and for uploaded PDFs, Word files and images.

Get a share link that works for everyone, following Google's sharing steps:

  1. Select the file and click Share.
  2. Under General access, change Restricted to Anyone with the link.
  3. Set the role to Viewer so people can't edit or delete anything.
  4. Click Copy link.

Work or school accounts may block "Anyone with the link". If the option isn't there, your administrator has turned it off, and you'll need a personal account or another host.

Updating the file later: for uploaded files such as PDFs, Google Drive lets you replace the file while keeping its link, through More, then File information, then Manage versions and upload a new version, per Google's version help. Google Docs, Sheets and Slides update in place automatically.

Option 2: Dropbox

In Dropbox, hover over the file, click Share, then copy a Link for viewing, as described in Dropbox's help on shared links. People without a Dropbox account can preview the file.

Dropbox links end in a parameter such as dl=0. Changing it to dl=1 forces a download instead of the preview. On phones, the preview is usually friendlier, so leave the link as it is unless you want people to save the file.

Option 3: your own website

Uploading the document to your own site, for example yoursite.com/docs/price-list.pdf, gives you the cleanest address and full control. You can replace the file at the same address whenever it changes, and the code keeps working. If it's a PDF, how to generate a QR code for PDF files has tips on file size and mobile readability.

HostBest forKeep in mind
Google DriveQuick sharing, Google Docs and SheetsCheck general access; work accounts may block public links
DropboxTeams already on DropboxViewers without an account get a preview only
Your websiteLong-lived, public documentsYou need a way to upload files to your site

Make the code on StylQR

  1. Open the Google Drive QR code generator and paste the link into Google Drive Share URL. For Dropbox, use the Dropbox QR code generator; for a file on your own site, the PDF or URL types work the same way.
  2. Before anything else, open the link in a private browser window where you're not signed in. If you can see the document there, scanners will too.
  3. Style the code and add a frame with a label that says what the document is, for example "Scan for the price list".
  4. Check the scan score and use Test scan, then scan on a phone using mobile data.
  5. Download SVG or a print-ready PDF for print, or PNG for screens and slides.
Warning: Never put a confidential document behind an "anyone with the link" share. A QR code on a noticeboard or slide can be photographed and passed on, and anyone with the link can open the file.

Common uses

What goes wrong and how to fix it

"You need access" or a sign-in screen. The share is still restricted. Change it to anyone with the link and test in a private window.

The code broke after an update. A new upload created a new link. Use Manage versions on Drive, or overwrite the file at the same address on your site.

The file is slow to open. Large scanned PDFs can be tens of megabytes. Compress the file or split it.

The file was deleted or moved. The code points at nothing. StylQR codes are static and never expire, but they can't follow a file that's gone, so keep the document at its address for as long as the code is in circulation.

Next step

Pick the host, set the share to view-only for anyone with the link, test it signed out, and only then make and print the code.

Frequently asked questions

Can I put the document itself inside the QR code?

No. A QR code holds at most a few thousand characters, far less than a typical document. The code stores a link, and the document lives online.

Is a document shared by QR code private?

Anyone who scans the code, or gets a photo of it, can open the link. Don't use an anyone-with-the-link share for confidential files; share those with named people instead.

Can I see how many people opened the document?

StylQR doesn't provide scan analytics. Some file services show view activity for shared files, and pages on your own website can be measured with your site analytics.

Will the QR code work for a Google Doc as well as an uploaded PDF?

Yes. Any Google Drive item with a share link works, including Docs, Sheets, Slides and uploaded files, as long as its general access lets the scanner open it.

Share this guide

StylQR blog cover: How to Add a QR Code to Your Business Card, illustrated with a business card with an address book, a briefcase and a QR code on a sea green background

QR Code Tutorials

How to Add a QR Code to Your Business Card

Add a QR code to your business card that saves your contact in one scan or opens your profile. What to encode, size, placement, labels and print mistakes.

· 6 min read

StylQR blog cover: How to Create a QR Code for a Google Form, illustrated with a form with a checklist, a group of people and a Google icon on a indigo background

QR Code Tutorials

How to Create a QR Code for a Google Form

Turn a Google Form into a QR code people can scan to fill it in: get the right responder link, shorten it, generate the code free and avoid sign-in snags.

· 5 min read

StylQR blog cover: How to Create a QR Code for App Downloads, illustrated with app tiles with App Store and Google Play icons and a download arrow on a orange background

QR Code Tutorials

How to Create a QR Code for App Downloads

Make an app download QR code that sends people to your App Store or Google Play listing, plus the honest options for one code that serves iPhone and Android.

· 4 min read