Why ENCODEURL is in the formula
=IMAGE("https://qrcodesforever.com/qr.png?url="&ENCODEURL(A2))
https://qrcodesforever.com/qr.png is our image address; it draws a QR code as a PNG. ?url= marks the code as a web link. ENCODEURL(A2) rewrites your link so characters like &, ? and # travel safely inside our address, and IMAGE shows the result in the cell.
Leave ENCODEURL out and links with an & lose everything after it, without any error. Our Excel page shows the before-and-after we decoded. Sheets has ENCODEURL on every platform, unlike Excel for Mac and the web, so there's no reason to skip it here.
Size and shape
Google Sheets' IMAGE function has four modes (Google: IMAGE function). Mode 1, the default, fits the image inside the cell and keeps its shape, which is what you want almost every time. Mode 2 stretches it to fill the cell and will squash the code, and mode 3 shows it at its original size, which can crop it. Mode 4 takes a height and width in pixels:
=IMAGE("https://qrcodesforever.com/qr.png?url="&ENCODEURL(A2), 4, 150, 150)
Use the same number for both.
Other codes from the same formula
Change what comes after the ?:
| You want | Formula in B2 |
|---|---|
| A web link | =IMAGE("https://qrcodesforever.com/qr.png?url="&ENCODEURL(A2)) |
| Plain text, like a ticket or SKU | =IMAGE("https://qrcodesforever.com/qr.png?text="&ENCODEURL(A2)) |
| A sharper image for print | add &"&size=1024" before the last bracket |
| Dark blue instead of black | add &"&fg=%231d3fd6" before the last bracket |
A large blue code for the link in A2 looks like this:
=IMAGE("https://qrcodesforever.com/qr.png?url="&ENCODEURL(A2)&"&size=1024&fg=%231d3fd6")
The embed reference lists every option, and the Google Sheets developer guide has an Apps Script that saves every row's code to Drive.
One code per form, class or table
A common sheet has a row per classroom, event or restaurant table, each pointing at a different Google Form or Doc. Paste each share link into column A and fill the formula down. Check sharing on every file before you print: a Doc left on Restricted asks scanners to request access, and our Google Docs guide shows the setting to change. For forms, use the Send link, as the Google Form QR code page explains.
Guides that use Google's chart address
Many tutorials still build this formula on Google's old chart address, chart.googleapis.com/chart?cht=qr. When we requested a QR code from it on 1 December 2026, it returned a 404 error page, which is why old sheets now show empty cells where the codes used to be. Our Chart API replacement page maps the old chl and chs settings to ours.
What the formula sends, and the alternative
Each cell's value goes to our server inside the image address so we can draw it. Keep passwords and personal details out of the column. The codes you print are ordinary static codes: the link is in the pattern, so a printout keeps working whether or not our image address ever loads again.
When you need the codes as files, or a logo and rounded dots, Sheets isn't the tool. Download the sheet with File, then Download, then Comma-separated values (.csv), and upload it to the bulk QR code generator, which builds every code in your browser and hands back one ZIP.