# How to add a QR code to a PDF

> The clean route is placing the code in the source document (Word, InDesign, Google Docs), before exporting, as SVG so it stays vector inside the PDF. Failing that, insert the image with a PDF editor, or regenerate the document. Zoom to 800% afterwards: crisp edges mean vector, fuzzy means rasterised.

Source: https://useqr.app/docs/how-to/how-to-add-a-qr-code-to-a-pdf · Last reviewed 2026-08-21 · UseQR is free forever, no signup.

---

## 1. Pick your route

| Situation | Route |
|---|---|
| You control the source document | **Place the code before export**, the clean path |
| Finished PDF, no source available | Insert with a PDF editor |
| PDF is generated by software | Regenerate with the code in the template |

## 2. Route A: place in the source, then export

Add the code to the Word, Google Docs, InDesign or design file and export to PDF as
usual. Use the **SVG** download where the tool accepts it
([Word does](/docs/how-to/how-to-make-a-qr-code-in-word), InDesign and Illustrator do),
a vector placed in the source **stays vector inside the exported PDF**, which means it
prints perfectly at any size and survives any zoom. Where only bitmaps are accepted
([Google Docs](/docs/how-to/how-to-make-a-qr-code-in-google-docs)), insert a PNG at
[300 DPI for the final printed size](/docs/how-to/how-to-make-a-high-resolution-qr-code).

Size and placement follow the usual print rules, at least **2 cm** for a handheld page,
[one tenth of the scanning distance](/docs/print/qr-code-size-for-print) otherwise, with a
quiet zone of 4+ modules kept clear of borders and text.

## 3. Route B: edit the finished PDF

Every serious PDF editor (Acrobat, PDF Expert, LibreOffice Draw, the better online
editors) can stamp an image onto a page:

1. Download the code as **PNG at 300 DPI of its final printed size** (many editors
   rasterise placed SVGs anyway, so control the resolution yourself).
2. Insert the image, position it, and type exact dimensions if the editor allows rather
   than dragging.
3. Save as a new file and inspect (next section).

Free-tier caveat: some online PDF editors recompress every image on save:
[compression is a code-killer](/docs/troubleshooting/qr-code-broken-by-image-compression).
If the saved file's code looks softer than what you inserted, use a different editor.

## 4. The 800% zoom test

Open the final PDF and zoom to 800% on the code:

- **Edges still razor sharp** → the code is vector (or a comfortably high-res bitmap).
- **Edges fuzzy or stair-stepped** → it was rasterised at too low a resolution somewhere,
  usually export settings ("reduce file size", "optimise for web") or an editor's
  compression. Re-export with images at 300 DPI+, or place a bigger PNG.

Two traps specific to PDF pipelines: **transparency flattening** can silently rasterise
vector codes that overlap transparent objects (keep the code clear of drop shadows and
soft masks), and aggressive "optimise PDF" presets downsample images to 150 DPI or below.

## 5. Verify the actual file

Scan the code from the PDF on screen (that
works fine), and if the PDF will be
printed, print one page at 100%, not "fit to printer margins", which
[rescales and can clip codes](/docs/troubleshooting/qr-code-cut-off-in-a-pdf), and scan
the paper. The [validator](/validate) accepts a screenshot or export of the page and
confirms the payload decodes exactly.

## Gotchas

- **"Reduce file size" after the fact** undoes your careful resolution. Compress text and
  fonts, not images, or skip it.
- **Codes near the page edge** fall into printer margins on borderless-incapable
  printers. Keep the code inside the safe area.
- **Password-protected or signed PDFs** cannot be edited without invalidating the
  signature, place the code before signing.
- **A QR code in a PDF is still static**. It encodes its destination permanently, which
  is exactly what you want for a document that will be archived. See
  do QR codes expire.

Generate the code to place: [make a QR code](/url?data=https://example.com) and download
SVG for the source document, PNG for a PDF editor.

## FAQ

### How do I insert a QR code into an existing PDF?
Open the PDF in an editor that can place images (Acrobat, LibreOffice Draw and others) insert a 300 DPI PNG of the code, size it to at least 2 cm, and save. Then zoom in to check sharpness and scan it.

### Will the QR code stay sharp inside the PDF?
Yes if it went in as vector (SVG placed in the source document) or as a sufficiently large bitmap. Zoom to 800%: crisp edges mean you are fine; fuzz means re-export at higher image quality.

### Can I add a QR code to a PDF for free?
Yes: generate the code free at UseQR and place it with any free PDF editor, or add it to the source document and re-export. Avoid free online editors that recompress images on save.

### Why does my PDF's QR code not scan after printing?
Usually downsampling ("reduce file size" exports), printing at "fit to page" which shrinks it below minimum size, or the code sitting too close to the trimmed edge. Print at 100% and re-test.

## Try it

- https://useqr.app/url
- https://useqr.app/validate
