How to Create a QR Code for a PDF or Document

A QR code can't actually hold a whole PDF. What it can hold is a link, and once you know that, making one that opens your document is about a minute's work.

Why you can't just "encode the PDF"

A QR code's pattern can only carry so much data directly — a few thousand characters at the outside, and fewer than that if you still want it easy to scan from an ordinary phone camera. Even a short PDF blows past that limit once its contents get represented as encodable text; the file is simply too big to live inside the code itself. So the workaround isn't really a workaround — it's the standard method: put the file somewhere it gets a web address, and encode that address instead of the document.

The 3-step version

  1. Upload your file somewhere it gets a link

    Google Drive, Dropbox, OneDrive, your own site's file storage — any of these work, as long as the upload gets you a shareable web address for the file.

  2. Set the sharing permission to "anyone with the link"

    Leave this on the default and most people who scan the code will land on a login screen instead of your document — the link has to open without asking anyone to sign in.

  3. Generate a QR code from that link

    Drop the link into a QR code generator, download the image it produces, and that's the code ready to print or share.

Getting the sharing permissions right

This is the step people most often get wrong. Upload a PDF to Google Drive, Dropbox, or OneDrive and the default sharing setting is usually "restricted" or "only people I've shared with" — fine for you, since you're logged in, but useless for anyone scanning a printed code. Before generating anything, open the file's sharing settings and switch it to "Anyone with the link can view" (the exact wording varies by service). Then check your own work: open the link in a private or incognito browser window and confirm it loads the document without asking you to sign in first.

A note on static vs. dynamic codes

Once the link works, encode it straight into a static QR code — no expiration date, no dependency on some third-party redirect service staying in business. Dynamic codes, which route through a redirect and usually cost a subscription, only earn their keep if you need the same printed code to eventually point at a different file entirely. That situation comes up less often than people assume: replace the document at your existing Drive or Dropbox link, and the link itself doesn't change, so any QR code you've already printed keeps working without a single edit.

Frequently asked questions

Can a QR code contain the actual PDF file, not just a link?
Technically, for a file small enough it barely counts as a document. A QR code tops out at a few thousand characters, and turning a PDF's raw data into encodable text inflates it well past its original size — you're realistically covering a sentence or two of content. Anything longer needs a link encoded instead of the file itself.
Where should I upload the PDF?
Google Drive, Dropbox, OneDrive, or your own site's file storage all give you a direct shareable link, so any of them work. The only requirement is that the link opens — or downloads — the file without asking the visitor to log in first.
Why does my QR code lead to a "request access" or login page?
The file's sharing setting is probably still restricted. On Google Drive, that means changing "Restricted" to "Anyone with the link" before you generate the code — skip that step and most people scanning it hit a permission wall instead of your document.
Will the QR code stop working if I replace the file later?
No, as long as you keep the same link. Re-uploading a new version to that same Google Drive or Dropbox file — rather than creating a fresh one — leaves the link untouched, and the QR code keeps pointing to it correctly.
Should I use a static or dynamic QR code for a document link?
Static, for almost every situation — just encode the file's link directly. Reach for a dynamic (redirect-based, typically paid) code only if you specifically expect to swap in a completely different file down the road and can't simply replace the original in place.
Does the file open automatically, or does it download?
That's down to the hosting service and the visitor's browser, not the QR code — the code just carries the link. A PDF link commonly opens right in the browser on a phone, while some desktop setups download it instead.

Tools for this