If the code should open the doc, fix sharing first
Most QR codes made for a Google Doc are handouts that point back at the doc: a sign-up sheet, class notes, an event plan. When one of these doesn't work, the image is rarely to blame. A new doc is set to Restricted, so anyone who scans the code without access lands on a page asking them to sign in or request access.
- In your doc, click Share.
- Under General access, change Restricted to Anyone with the link. Leave the role as Viewer unless people need to edit.
- Click Copy link and paste it into the generator above.
- Scan the result on a phone that isn't signed in to your Google account. That's the only test that shows what a stranger will see.
If you'd rather people see a clean page without the editing toolbar, use File, then Share, then Publish to web, and make the code from the published link instead. For a form, use the form's Send link; the Google Form QR code page has the details.
Getting the code into the doc
Google Docs treats a QR code like any other picture, so it all comes down to moving an image in.
Copy and paste is the fastest. Click Copy image in the generator and paste into the doc.
Upload the PNG when you want to keep the file. Download it at 1024px or 2048px, then use Insert, then Image, then Upload from computer. Use a PNG rather than an SVG; Google's help page on inserting images doesn't list SVG as an option.
Insert by URL pulls the image straight from our site. Use Insert, then Image, then By URL, and paste:
https://qrcodesforever.com/qr.png?url=https://example.com&size=1024
Swap https://example.com for your link. Two characters break this. An & in your link starts a new setting in our address, so https://shop.com/item?id=4&color=red becomes a code for https://shop.com/item?id=4; we checked that by decoding the image our server returns. And everything after a # never reaches our server at all. If your link has either character, use copy and paste. For a code in every row of a list, the Google Sheets formula handles the encoding for you. Your link also travels to our server inside the address, so keep private links out of this method. Docs stores its own copy of the image, so the code stays in the doc whatever happens to the address later.
Printing it
On a printed page read at arm's length, a code about 2.5 cm (1 inch) across is enough; anything read from further away belongs in the QR code size guide. Put a short line under it saying what it opens, like "Scan for the sign-up form", and keep it off colored table cells. Our codes are static, so a printed handout keeps working for as long as the doc stays shared. Switch sharing back to Restricted and the same printed code opens the request-access page instead.