You have a list of 200 products, each with its own URL, and you need a QR Code for every label. Generating them one by one in an online tool would take hours. The good news: both Google Sheets and modern Excel let you create QR Codes right inside the spreadsheet, with a formula, without installing anything extra.
This guide covers both paths — Sheets and Excel — with ready-to-copy formulas, a step-by-step for bulk generation, and when it makes sense to use a trackable dynamic QR instead of the static API-generated one.
How the idea works
Public QR Code APIs receive data via a URL and return a PNG image. You embed that URL inside the spreadsheet's image function, and the QR appears in the cell. No magic involved: it's the same principle as placing any image URL inside an =IMAGE(...) formula.
The most widely used API for this is Google Chart:
https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=YOUR_DATA_HERE
cht=qr→ QR Code typechs=200x200→ image size in pixelschl=→ the data to encode (URL, text, asset number, etc.)
Method 1 — Google Sheets (easiest)
Sheets has the native =IMAGE() function. Combine it with ENCODEURL to avoid breaking on special characters.
Step-by-step
- Put your data (links, text) in column A, starting from A2.
- In cell B2, paste this formula:
=IMAGE("https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl="&ENCODEURL(A2))
- Drag B2 downward — each row generates its own QR automatically.
- Adjust row height (right-click the row → "Resize row") so the full QR is visible.
- To export, take a screenshot or use File → Download → PDF with rows sized appropriately.
Tip: increase to
chs=400x400for larger, more print-ready QRs.
Variation: Wi-Fi QR Code
Replace the content of A2 with the Wi-Fi string:
=IMAGE("https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl="&ENCODEURL("WIFI:S:NetworkName;T:WPA;P:PasswordHere;;"))
Method 2 — Excel (Microsoft 365)
Excel gained the =IMAGE() function in Microsoft 365 (web and updated desktop). The logic is identical.
Step-by-step
- Data in column A, starting from A2.
- In cell B2:
=IMAGE("https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl="&ENCODEURL(A2))
- Press Enter. If you see
#FIELD!, Excel is still loading the image — wait a few seconds. - Copy B2 and paste it into the rows below.
Older Excel (no IMAGE function): the workaround is inserting images manually via Insert → Pictures → Picture from Web pointing to the API URL — but that kills automation. For large lists in legacy Excel, Google Sheets is the more practical option.
Bulk generation: 1 QR per row
The biggest advantage of this approach is scaling to hundreds of rows effortlessly.
| Column A (data) | Column B (QR generated by formula) |
|---|---|
| https://store.com/product/001 | [QR image] |
| https://store.com/product/002 | [QR image] |
| ASSET-00345 | [QR image] |
| TEL:+15551234567 | [QR image] |
Typical use cases:
- Product catalog — each item's link becomes a QR for its label
- Asset tracking — asset number becomes a QR for the tag
- Event list — each speaker/room link becomes a QR for the badge
- Digital menu — each dish with a QR linking to details or allergens
Tool comparison table
| Tool | Formula available | Bulk generation | Dynamic QR | Tracking |
|---|---|---|---|---|
| Google Sheets | Yes (=IMAGE + ENCODEURL) |
Yes (drag formula down) | No | No |
| Excel 365 | Yes (=IMAGE) |
Yes (copy formula down) | No | No |
| Legacy Excel | No (manual insertion) | Very limited | No | No |
| Code2Scan | Via web generator | Yes (CSV upload) | Yes | Yes |
Limitations of static API-generated QRs
QRs produced by the formula are static — the data is baked into the code. That means:
- If the URL changes, the QR breaks. You need to regenerate and reprint.
- There's no scan counter — you don't know how many people scanned it.
- No geolocation, access time, or campaign data.
- The Google Chart API is free but carries no guaranteed SLA.
For anyone who needs tracking and flexibility, the path is a dynamic QR: the QR points to a redirector you control. You can change the destination without reprinting, and see every scan in a dashboard. Read more in Trackable QR Code with UTM and Google Analytics and the guide to creating a QR Code for free.
On file format, see QR Code SVG vector vs PNG — for label printing, SVG is always the safer choice. Also check the minimum QR Code size to ensure readability on physical labels.
Common mistakes
❌ Data with special characters without ENCODEURL
A URL with spaces, accented letters or & breaks the formula. Always use ENCODEURL(A2) instead of concatenating A2 directly.
❌ Image too small in the cell
The QR appears but is unreadable. Increase to chs=400x400 and resize the row to at least 1.2 inches / 3 cm tall.
❌ QR generated for very long text
The more characters, the denser the QR — and the harder it is to scan with a regular camera. Long URLs should be shortened first, or replaced by a dynamic QR with a short URL.
❌ Relying on the Google Chart API in production
The API is great for prototyping, but for large-scale print runs (labels, packaging, banners), use a professional generator that guarantees availability and vector quality.
❌ Not testing the QR before printing
Always scan the generated QR before sending to the printer. A typo in the URL makes every label useless.
Summary
- In Google Sheets, use
=IMAGE("https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl="&ENCODEURL(A2))— drag down to all rows. - In Excel 365, the same formula works with
=IMAGE(). - For large lists, the formula scales automatically — 1 QR per row with no extra effort.
- API-generated QRs are static — no tracking and no flexibility to change the destination.
- For campaigns, asset management, or any professional use, prefer a dynamic QR with a scan analytics dashboard.
Need high-resolution QRs, branded with a logo, or trackable dynamic ones? Create your QR Codes on Code2Scan — SVG/PNG export, unlimited generation, and analytics included.