Google Sheets QR Code: Formula and Bulk Method
Sep 16, 2026 · QRmkr Team
The short answer
Google Sheets has no built-in QR code function, but it can display one in a cell with a single formula. Put a link in A2, then in B2 enter:
=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=300x300&data="&ENCODEURL(A2))Drag it down and every row gets its own code. That is the whole trick, and for a quick look at a list of links it is all you need. The rest of this guide covers what the formula cannot do - give you files to print - and the two questions that usually follow: how to turn a whole column into real PNG or SVG files, and how to make a QR code that opens a sheet.
Method 1: the IMAGE() formula, row by row
The formula works because IMAGE() renders any picture at a public URL inside a cell, and a QR image API is just a URL that returns a picture. Three parts matter:
- The API address. The example uses api.qrserver.com, a free service that has been stable for years. QuickChart offers the same thing at
https://quickchart.io/qr?text=. Either works; the formula is otherwise identical. ENCODEURL()wraps your link so its own question marks and ampersands do not break the request. Skip it and any link with tracking parameters produces a code that opens the wrong page.- The size parameter only sets the image the API returns. Row height decides what you see; make the rows taller (select them, right-click, Resize rows) or the codes come out as unreadable thumbnails.
To generate codes from a column rather than one cell, fill the formula down, or use one array formula at the top of the column so new rows pick it up automatically:
=ARRAYFORMULA(IF(A2:A="","",IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=300x300&data="&ENCODEURL(A2:A))))Two limits are worth knowing before you build anything on this. The codes are fetched from the API every time the sheet recalculates, so the sheet depends on a third-party service staying up, and each link in the column is sent to that service. And the images live inside cells: there is no save as on a cell picture, and a screenshot of a 300-pixel render is not a print file. For a screen-only list, fine. For anything that goes on paper, use method 2.
Method 2: export the column and get real files
When you need codes as files - labels, asset tags, table numbers, a code per product page - the spreadsheet is the right place to keep the list and the wrong place to render it. Move the list into a bulk generator instead:
- In Sheets, put a name in one column and the link in the next, so the files come out named. A header row like
name,urlis fine. - Select both columns and copy, or download the sheet as CSV (File > Download > Comma Separated Values).
- Paste or upload into the bulk QR code generator. It reads one link per line and comma-, semicolon-, or tab-separated rows.
- Download the ZIP: one PNG or SVG per row, named from your name column, plus a manifest that maps every file back to its link.
This route has the opposite properties to the formula. It runs in your browser, so the links never leave your machine, and the output is print-grade: 1024-pixel PNGs or SVGs that scale to any size. It is also free with no watermark, and there is no account involved. The trade-off is that it is a snapshot: change a link in the sheet and you export again.
Method 3: Apps Script, if you want it automatic
If the list changes constantly and someone has to regenerate codes every week, a short Apps Script can do it on a schedule. The script reads the link column, requests each image from the same API the formula uses, and either writes an IMAGE() formula into the neighbouring cell or saves the pictures to a Drive folder with UrlFetchApp and DriveApp. It is about twenty lines, but it needs the script to be authorised for Drive access, and the codes are still the API's images, not files you rendered. Most teams that get this far are better served by making the codes dynamic instead, which is the next section.
When the sheet is the wrong tool entirely
A spreadsheet QR code is static: the link is baked into the pattern. That is right for links that never move. It goes wrong when the sheet is a list of things that change - product pages that get renamed, menus that get updated, campaign links that rotate. Every change means a new code, a new export, and a reprint of whatever the old code was on.
A dynamic QR code encodes a short redirect you control instead of the final link, so you edit the destination and the printed code keeps working. It also records every scan, which a formula cannot do. If the spreadsheet is really an inventory of printed codes that will outlive their links, create them as dynamic codes from a Pro account and keep the sheet as the index, not the generator. Static vs dynamic QR codes walks through the decision.
Making a QR code that opens a Google Sheet
The other thing people mean by a Google Sheets QR code is a code that opens the sheet itself: a sign-up list on a noticeboard, a rota on a staff-room door, a price list on a counter. The setup is the same as for any link, with one step that trips people up:
- Open the sheet, click Share, and under General access change Restricted to Anyone with the link. Leave the role as Viewer unless people are meant to type into it; Editor on a public code is how sign-up sheets get wiped.
- Copy the link. If the sheet has several tabs, copy it with the tab you want open, so the scan lands on the right one.
- Paste it into the QR code generator and download the code. Free, no signup, and a static code never expires.
- Scan the printed proof with a phone that is not signed into your Google account. If it shows a request access screen, step 1 did not save.
A sheet is fine to read on a phone but hard to edit on one. If the point of the code is collecting answers, put a form in front of the sheet: a Google Form QR code opens a form whose responses land in the sheet automatically. The same permission rules apply to a Google Docs QR code.
Printing the codes
Whichever method produced them, the print rules are the same: dark code on a light background, a clear margin around the pattern, and at least 2 x 2 cm for anything read at arm's length. The print size guide has the sizes for labels, posters and signs. Scan one printed sample before running the whole batch; a column of two hundred codes that are all a millimetre too small is an expensive way to find out.
Frequently asked
Does Google Sheets have a built-in QR code function?
No. There is no QRCODE() function. The IMAGE() formula displays a code by fetching it from a QR image API, and the bulk method exports the column to a generator that produces files. Both are workarounds for a function Sheets does not have.
Can I download the QR codes the formula makes?
Not as files. An IMAGE() cell has no save option, and copying it out of the sheet gives you a low-resolution render. To get PNG or SVG files for print, export the link column and run it through a bulk generator.
Are my links sent anywhere when I use the formula?
Yes. Each link is sent to the image API in the request URL every time the sheet recalculates. If the list is internal or unreleased, use the bulk generator instead, which builds the codes in your browser without uploading the links.
Why does the QR code to my sheet show a request-access page?
The sheet's general access is still Restricted. Open Share, set it to Anyone with the link, and test the printed code on a phone that is not signed into your account.
Before you print it
If the code in your next print run may ever need to point somewhere else, create it as a dynamic QR code you can edit after printing. The printed pattern never changes; only the destination behind it does. It also means you can track every scan by day, device, and location and see which placement actually worked.
Make a QR code you can edit anytime
Free static codes. Dynamic codes with analytics on Pro.
Start free