How to make QR codes in Google Sheets, with a formula that still works
Generate QR codes in Google Sheets: a one-cell IMAGE formula that still works, an Apps Script loop, an add-on, or a free bulk generator for label sheets.
Short answer
To make a QR code in Google Sheets, put the value in A2, enter =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&ENCODEURL(A2)) in B2, and fill it down the column.
Older tutorials use chart.googleapis.com, which returned a 404 when QR to Sheets tested it on 2026-10-08, and the working formula sends each value to a third-party service, so keep it to IDs that are not sensitive.
For image files use a Google Apps Script loop; for printable labels, the free tool at qrtosheets.com/tools/bulk-qr-codes makes up to 500 codes in the browser with no signup.
This is the opposite direction from scanning: you have a list of items, people or locations in a Google Sheet, and you want a QR code for each one. There are four practical methods, and which is right depends mostly on whether you need the codes on screen, as files, or on a sheet of labels.
We make a free tool for the label case, which is disclosed below where it is relevant. The formula and Apps Script methods involve no products at all, and the add-ons are third-party products we have no connection with.
Method 1: the IMAGE formula, entirely inside Sheets
Google Sheets can render a QR code in a cell with a single formula, using a public chart endpoint that returns an image. Put your value in A2 and this in B2:
- =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & ENCODEURL(A2))
- Fill the formula down the column and every row gets its own code.
- ENCODEURL matters — without it, spaces, ampersands and slashes break the request.
- Codes update automatically when the cell value changes, which is genuinely useful.
The honest limitations: these are live images fetched from a third-party service, so they need a network connection to display, they disappear if that service changes, and the values in your column are being sent to it. They also cannot be exported as individual image files, and printing them means printing the spreadsheet.
Do not use this method for anything confidential. Every value in the column is sent to a third-party URL as a query parameter. For internal asset IDs that is usually fine; for names or anything sensitive it is not.
One warning about older tutorials, because many of the guides ranking for this question still show a formula that no longer works. They tell you to use chart.googleapis.com, Google Image Charts with cht=qr. Google deprecated that service years ago, and when we requested a QR code from it on 2026-10-08 it returned an HTTP 404 instead of an image, while the api.qrserver.com address in the formula above returned a PNG. So if you have copied a formula containing chart.googleapis.com and the cell stays empty, your sheet is not the problem: swap the address for one that still returns an image and keep the ENCODEURL part as it is.
Method 2: Apps Script, for files and full control
A short Apps Script can loop your column, fetch or generate a code per row, and either insert it into the sheet or save PNGs to a Drive folder. Free, no third-party dependency if you use a local library, and completely yours.
- Produces real image files you can drop into labels, emails or documents.
- You control size, error-correction level and quiet-zone margin.
- Runs on a schedule, so a growing list can generate codes automatically.
- It is code you now maintain, and Apps Script quotas apply to large batches.
Method 3: a Google Workspace Marketplace add-on
If you would rather click than write a formula, add-ons from the Google Workspace Marketplace generate codes from a selected range. AnyMerge QR Code Generator, listed as a free trial, makes QR codes and 12 barcode formats from spreadsheet values and saves them to a Google Docs document or as PNG files in Google Drive. QR Barcode Generator for Sheets Docs Forms by docgpt.ai, listed as free of charge, generates codes from a selected range or a custom template. Both ask for access to your Google account when installed, so read the permissions on their listing first. Both listings were read on 2026-10-15.
Method 4: a bulk generator with printable labels
This is the case we built a free tool for, so treat this section as interested. If what you actually want is a sheet of labels to stick on things, the formula and Apps Script routes do not get you there without a lot of manual layout work.
The free bulk QR code generator takes a pasted list or a column copied from Google Sheets, generates up to 500 codes, and lays them out on print-ready label grids matching Avery L7159 and L7165 (A4) and 5160 and 5163 (US Letter) stock. It runs entirely in the browser, so the list never leaves the device, and there is no account and no watermark.
- Free with no signup, and no email required.
- Print layouts in millimetres with an 18mm minimum, so printed codes stay scannable.
- Nothing is uploaded — relevant if your values are internal identifiers.
- It is one-directional: it makes codes, it does not read them back.
What to encode
- Short internal IDs, not descriptions. Descriptions go stale the moment an item is repurposed.
- A short ID prints smaller and scans faster and more reliably than a long string.
- A URL only if the person scanning needs to land somewhere. Otherwise it is wasted density.
- Never encode personal names on anything that will be stuck to an object and left in public.
- If you might migrate to a real asset system later, IDs port cleanly. Descriptions do not.
Printing so they actually scan
- 18mm square minimum on a normal office printer. Bigger if the surface curves.
- Keep the quiet zone — the white border. A code trimmed flush to its edge often will not read.
- High contrast only. Dark code on a light background; skip the brand colours here.
- Matte labels over glossy, because glare defeats a camera under ceiling lights.
- Cold, damp or greasy environments need laminated or synthetic labels, not paper.
Then what?
Generating codes is half a system. The other half is reading them back into a sheet, which is a genuinely separate problem with its own methods — Google Forms, Apps Script, phone apps, USB scanners or a browser scanner link such as QR to Sheets, which appends a timestamped row each time one of your printed codes is scanned. How to scan QR codes into Google Sheets compares them, free routes first. If your plan is to label items and then count or track them, decide how you will scan before you print five hundred labels. For attendee badges at a seminar or training day, QR badges for session attendance covers the scanning half. For vouchers, meal tickets or drink tokens that should each work once, single-use QR codes covers numbering them and refusing a second redemption.
Step by step
- 1
Put the values in one clean column
One value per row, no blanks, no trailing spaces. Whatever is in the cell is exactly what the code will contain, including a stray space you cannot see.
- 2
Decide what the code should contain
A short ID scans faster and prints smaller than a long URL. Encode an ID and look up the detail in your sheet, rather than encoding a description that will go stale.
- 3
Pick a method by what you need out
Codes visible inside the sheet, codes as image files, or codes laid out on a printable label sheet. These are three different jobs, and each has a method that fits it.
- 4
Print at 18mm or larger
Below roughly 18mm square, phone cameras start failing on ordinary office printers. Test one sheet before printing five hundred.
- 5
Scan a sample before committing
Print one page, scan every code on it with an actual phone. Finding an encoding problem now costs a sheet of paper; finding it after labelling 500 items costs a day.
Frequently asked questions
Can Google Sheets generate a QR code with a formula?+
Yes. =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & ENCODEURL(A2)) renders a code in the cell and updates when A2 changes. The caveats: it needs a network connection to display, it depends on a third-party service, and your cell values are sent to that service as URL parameters.
Why is my QR code not showing in Google Sheets?+
Check three things, in this order. First, the address: a formula built on chart.googleapis.com returned an HTTP 404 when we tested it on 2026-10-08, so the cell stays empty; swap it for the api.qrserver.com formula above. Second, the value: wrap the cell in ENCODEURL, because spaces, ampersands and slashes in the value break the request. Third, if Sheets says it cannot parse the formula, check the separators: a sheet whose locale writes decimals with a comma may expect semicolons where a copied formula has commas between arguments, so try replacing them.
Is there a built-in QR code function in Google Sheets?+
No. There is no native QR function — every formula method calls an external image service through IMAGE(). For codes that do not depend on a third party, use Apps Script or a client-side generator.
How do I create QR codes for a whole column at once?+
Fill the IMAGE formula down for codes inside the sheet, use an Apps Script loop if you need image files, or paste the column into a bulk generator if what you want is a printable label sheet. The right choice depends on whether you need them on screen, as files, or on labels.
How small can a printed QR code be?+
About 18mm square is the practical floor on an ordinary office printer for reliable phone scanning. Go larger for curved surfaces, poor lighting, or codes that will be scanned at speed, and always keep the white quiet zone around the edge.
Should I encode an ID or a description?+
An ID. Descriptions go stale as soon as an item is repurposed, they print larger, and they scan less reliably. Encode a short ID and keep the descriptive detail in your sheet, where you can edit it.
Is it safe to use the IMAGE formula method for private data?+
No. Every value in the column is sent to a third-party service as a URL query parameter. For internal asset IDs that is normally acceptable; for names or anything sensitive, use a method that generates codes locally instead.
Can I generate codes for free without an account?+
Yes. The formula method is free, Apps Script is free, and qrtosheets.com/tools/bulk-qr-codes is free with no signup, no email and no watermark, generating up to 500 codes entirely in your browser.
How do I make a QR code that opens my Google Sheet?+
Copy the sheet's link from Share, then turn that URL into a code with the IMAGE formula above or any generator. Anyone who scans it can only open the sheet if its sharing settings allow them, so use this for sheets meant to be read. To let people add rows without access to the sheet, give them a Google Form or a QR to Sheets scanner link instead.
Can I scan the QR codes I generated back into the same Google Sheet?+
Yes. A QR to Sheets scanner link writes each scan as a new timestamped row in the Sheet you connect, so a printed code per item and a scan per movement gives you a log. The free routes are a Google Form, where people paste or type the scanned value, or an Apps Script web app that you build and maintain.