QR codes in Word, Excel and Google Docs

A code is just a picture, but office apps love to compress and stretch it. Here is which file to insert, how to set the size precisely and why a code sometimes stops scanning after export to PDF.

Updated · 2 min read

Which file to download

Where it goesFormatWhy
Word, PowerPoint — for printSVGVector stays sharp at any size
Word — screen onlyPNG 1024 pxSmall file, good enough on screen
Excel, Google SheetsPNG 1024 pxSVG cannot go inside a cell
Google DocsPNG 2048 pxUpload recompresses the image, so keep headroom

Download the code on a white background, not transparent. On a transparent PNG the light modules take the page colour, and on a tinted background the code stops scanning.

Word: insert and exact size

  1. Insert → Pictures → This Device and pick the file you downloaded.
  2. Select the picture, open Picture Format and type the height and width — 1 × 1 inch (25 × 25 mm) is a good default.
  3. Keep «Lock aspect ratio» on: a code stretched along one axis will not scan at all.
  4. For a code in the page corner choose the «In Front of Text» wrap so it stops jumping when you edit paragraphs.

Excel: a code next to the data

Excel puts pictures on top of the sheet, not inside a cell. So the code does not drift when you sort rows, right-click it, open Size and Properties → Properties and choose «Move and size with cells».

When you need one code per row, generate them in bulk: the studio has a batch mode that takes a list of links and returns a ZIP of ready PNGs. File names come from the list, so matching pictures to rows later is easy.

Google Docs and Sheets

  • In Docs: Insert → Image → Upload from computer.
  • In Sheets you can place the picture inside a cell: Insert → Image → Image in cell.
  • The =IMAGE("url") formula only works with a picture hosted online; it cannot show a local file.

Why the code stops scanning after saving

What happenedWhat to do
Word compressed pictures on saveFile → Options → Advanced → «Do not compress images in file»
The code was dragged down to 0.5 inBring it back to at least 0.8 × 0.8 in (20 × 20 mm)
The picture was stretched on one axisLock the aspect ratio and set equal sides
Printed in greyscaleUse a black code on white, no colour gradient
The code ran into the margin or a foldKeep at least 5 mm from the edge and leave the quiet zone free

Before sending the document to a print shop, print one page on an office printer and scan the code from paper. Thirty seconds that saves the whole run.

FAQ

How big should the code be in a document?

For arm’s length scanning 20–25 mm (about one inch) is enough. On a poster use the rule of thumb: the code side is roughly a tenth of the scanning distance.

Can Word insert a different code for every recipient?

Yes, with mail merge. Generate the codes in bulk, keep the pictures in one folder and pull them in with an INCLUDEPICTURE field that takes the file name from a column.

Why is the code blurry in the exported PDF?

Word downsamples raster images on save. Insert an SVG instead, or turn image compression off in the document options.

Can the code live in a header or footer?

Yes, it is inserted the same way. Just keep it out of the non-printable area — usually 5 mm from the paper edge.

Read next

Your first code — in a minute

No sign-up. No subscriptions. Forever.

Open generator