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

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:
- Select the file and click Share.
- Under General access, change Restricted to Anyone with the link.
- Set the role to Viewer so people can't edit or delete anything.
- 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.
| Host | Best for | Keep in mind |
|---|---|---|
| Google Drive | Quick sharing, Google Docs and Sheets | Check general access; work accounts may block public links |
| Dropbox | Teams already on Dropbox | Viewers without an account get a preview only |
| Your website | Long-lived, public documents | You need a way to upload files to your site |
Make the code on StylQR
- 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.
- 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.
- Style the code and add a frame with a label that says what the document is, for example "Scan for the price list".
- Check the scan score and use Test scan, then scan on a phone using mobile data.
- Download SVG or a print-ready PDF for print, or PNG for screens and slides.
Common uses
- Handouts and course material linked from a printed sheet or slide. If it's for a talk, see how to create a QR code for presentations.
- Price lists and brochures that change each season, hosted at one stable address.
- Manuals and instructions on product packaging or equipment.
- Forms to download, with a Google Form QR code as the better choice when you want people to fill something in online.
- Restaurant menus as a PDF; how to create a QR code for digital menus covers that case.
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.


