How to Generate a QR Code for a PDF File
A QR code can't hold a PDF, but it can link to one. How to host the file, get a stable link, make the code, and keep the PDF readable on a phone.

People often ask how to "put a PDF in a QR code". The short answer is that you can't, and you don't need to. A QR code holds at most a few kilobytes of data, and even the largest version tops out below 3,000 bytes, far smaller than any real PDF. What you can do is put the PDF online and make a QR code that links to it. Done properly, scanning the code opens the document instantly on any phone.
This guide covers the part most tutorials skip: choosing where to host the file so the link stays stable and the PDF is pleasant to read on a phone.
The three steps
- Upload the PDF somewhere that gives you a public link.
- Check the link opens the PDF directly, without a login, on a phone.
- Turn the link into a QR code with the URL QR code generator, test, and print.
Step 1: Choose where to host the PDF
Your choice decides how long the code keeps working and how easy it is to update the document.
| Option | Pros | Watch out for |
|---|---|---|
Your own website (e.g. site.example.com/files/menu.pdf) |
Permanent, on your domain, you control it | Keep the address the same when you update the file |
| Website builder file manager (Squarespace, Wix, WordPress media library) | Easy upload | Replacing a file sometimes creates a new address |
| Cloud storage share link (Google Drive, OneDrive, Dropbox) | Quick and free | Must be set to "anyone with the link"; links break if the file is deleted or moved; some open a preview page instead of the PDF |
| Document hosting services | Nice viewers, statistics | Often paid; may stop working if you cancel |
For anything printed to last (menus, product manuals, signage), the best option is your own website, ideally behind a short, stable address like site.example.com/menu that you can point at a new PDF whenever it changes. We explain that approach in static vs dynamic QR codes.
Cloud storage links: make them public
If you use a cloud drive, the most common failure is permissions. A link that works for you (because you're signed in) may show "You need access" to everyone else. Set sharing to anyone with the link can view, then test the link in a private browser window or on a phone that isn't signed in to your account.
Updating the PDF without breaking the code
Whichever host you use, the trick is to replace the file at the same address rather than uploading a new one with a new link. On many website platforms, uploading "menu-v2.pdf" creates a new URL and the printed code still points to the old one. Either overwrite the file with the same name, or put a page or redirect at a stable address in front of it.
Step 2: Make the PDF phone-friendly
Everyone who scans the code reads the document on a small screen. A few changes make a big difference:
- Keep the file small. Compress images before exporting. A menu shouldn't take more than a second or two to open on mobile data.
- Use real text, not scanned images. Text-based PDFs are sharper, smaller, searchable and readable by screen readers.
- Consider a portrait page size with large text. A landscape A3 poster turned into a PDF is miserable to read on a phone.
- Put the most important information first. Many viewers open on page one, zoomed out.
- Add a title in the PDF's document properties so the browser tab shows something meaningful.
If the content changes often or has to work really well on phones, such as a restaurant menu, consider a simple web page instead of a PDF. It reflows to fit any screen.
Step 3: Make the QR code
- Copy the PDF's public link.
- Open the URL QR code generator and paste it.
- Style the code if you like, keeping it dark on a light background.
- Download a PNG for digital use or SVG/PDF for print.
- Scan the printed proof with two phones, on mobile data, while signed out of your cloud account.
Long cloud-storage links make dense codes. If yours produces a large grid, use your own short address that redirects to the file. Shorter links mean bigger modules and easier scanning.
Label the code properly
Tell people what they'll get and roughly how big it is when that matters: "Scan for the full menu (PDF)" or "Scan for the installation guide". Some people prefer to know a download is coming, especially on limited data plans.
Uses that work well
- Restaurant menus and price lists (restaurant guide)
- Product manuals and safety information on packaging (packaging guide)
- Event programmes and maps (events guide)
- Worksheets and reading lists in classrooms (education guide)
- Brochures and spec sheets at trade shows
Troubleshooting
"Access denied" or "Request access". The file isn't shared publicly. Fix the sharing setting.
It opens a preview page, not the PDF. That's how some cloud services work. It's fine, but your own website gives a cleaner experience.
The code worked last month, now it doesn't. The file was moved, renamed, deleted or replaced at a new address. Restore it at the original address or set up a redirect.
It's very slow to open. Compress the PDF; large images are the usual culprit.
Make the PDF accessible
A code is often the only route to the document, so it's worth making sure everyone can use what they find:
- Tag the PDF when exporting from your word processor or design tool, so screen readers can follow headings and reading order.
- Add alternative text to meaningful images and charts.
- Use real text with adequate size and contrast rather than text baked into images.
- Set the document language and title in the export settings.
- Offer an alternative, such as a web page version or a printed copy on request, for content people genuinely need, like menus, safety information or instructions.
Accessible PDFs are also smaller and easier to read on phones, so the effort pays off for every visitor.
Frequently asked questions
Can a QR code store a small PDF offline?
No practical PDF fits. The largest QR code version holds under 3 KB of binary data, and real PDFs are far larger. Even if it fitted, phones wouldn't know to open it as a document.
Will the QR code expire?
A static code made with our generator never expires. It will keep pointing to the same link, so keep the file available at that address.
Can I track how many people opened the PDF?
If it's on your website, your analytics can count visits, especially if you link to a short page that then opens the PDF. Cloud drives give limited or no statistics.
Summary
Host the PDF somewhere permanent, ideally on your own domain behind a short address; make sure anyone can open it on a phone; keep the file light and readable; then make a QR code for the link and test it signed out on mobile data. Create your PDF QR code.
Sources and further reading
QRaft Editorial Team
The people who build and maintain QRaft's tools. Every guide is written and checked against the tools on this site and the public specifications it cites. How we write and review guides.


