Yes, you can create QR codes directly inside Google Sheets using a built-in function called IMAGE combined with a QR code generator URL, or you can use a free add-on like QR Code Generator. The simplest method is to type a formula that calls Google’s Chart API, which returns a QR code image right in a cell.
Why Put QR Codes in a Spreadsheet?
QR codes in Google Sheets are useful for inventory tracking, event check-ins, product labels, or sharing a URL with a team. Instead of manually generating each code on a website, you can create dozens at once, update them by editing a cell, and even print a whole sheet of labels. Because the codes are generated by a formula, they stay in sync with your data—change the URL in column A, and the QR code updates automatically.
How the QR Code Formula Works
Google Sheets has a function called IMAGE that inserts an image from a URL. Google also provides a free Chart API endpoint that returns a QR code as an image. The formula combines them:
=IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl="&ENCODEURL(A2))
Assume your text or URL is in cell A2. The ENCODEURL function makes sure special characters (like & or ?) are safe for the API. The chs parameter sets the size (150×150 pixels), and chl is the data to encode. Drag the formula down to generate codes for a whole column.
Note: Google deprecated the Chart API for new projects, but the QR code endpoint still works as of 2025. If you want a more reliable, no-code option, use an add-on.
Using a Free Add-On Instead
If you prefer not to write formulas, install the “QR Code Generator” add-on from the Google Workspace Marketplace. After installing, go to Extensions > QR Code Generator > Generate QR Codes. You select a range of cells, choose the size and error correction level, and the add-on creates QR codes in adjacent cells. This is the easiest method for non-technical users, and it works entirely in your browser.
How to Choose the Right Method
- Formula (IMAGE + Chart API): Best for dynamic data, no extra install, and you can easily copy the formula. Downside: depends on an external API that may be deprecated in the future.
- Add-on: Simple menu-driven interface, more options (like colors and logos), but you must install it and it may have usage limits.
- Apps Script: Write a custom script to generate QR codes as images in cells. This is overkill for most users but gives full control.
Common Problems and Fixes
One frequent issue is that the QR code appears as a broken image icon. This usually happens when the URL in the chl parameter contains spaces or special characters that aren’t encoded. Always wrap the data with ENCODEURL as shown above. Another problem: the image is too small to scan. Increase the chs value to 300×300 or larger. If you use an add-on, make sure you select the correct range—if you pick a range that includes the cell where the QR code will appear, it can cause an error.
QR Codes vs. Barcodes in Sheets
QR codes store more data than traditional barcodes (up to about 4,000 characters) and can encode URLs, plain text, phone numbers, or Wi-Fi credentials. Barcodes are linear and hold only a few dozen characters. In Google Sheets, you can create barcodes using the IMAGE function with a barcode API, but QR codes are more versatile for modern use. If you need to scan codes with a smartphone, QR is the better choice.
Costs and Limitations
The Chart API formula is free, but it has a daily request limit (though it’s rarely hit for personal use). Add-ons are often free with limits—for example, the free tier of “QR Code Generator” allows a certain number of codes per month, after which you need a paid plan. Also, QR codes generated by the formula are static; you cannot change their content after scanning unless you edit the source cell. For dynamic QR codes (where the destination URL can be changed without reprinting), you’d need a paid service like QRCode Monkey or a URL shortener with a redirect.
Safety and Security Considerations
QR codes can be a security risk if they point to malicious websites. When you generate codes from untrusted data, always verify the URL before sharing. In a spreadsheet, if someone else edits the source cell, the QR code changes—so be careful with shared sheets. Also, avoid encoding sensitive information like passwords or personal data in a QR code that might be photographed or shared. For internal use, it’s safer to encode a link to a secure page rather than the data itself.
Frequently Asked Questions
Can I make a QR code in Google Sheets without an add-on? Yes, use the IMAGE formula with the Google Chart API as shown above. It requires no installation and works in any browser.
Why is my QR code not scanning? Common reasons: the image is too small, the contrast is low (use dark on white), or the data contains errors. Increase the size to at least 150×150, and make sure the cell background is white.
Can I change the color of the QR code? The Chart API doesn’t support color customization. For colored QR codes, use an add-on or a dedicated QR generator website, then insert the image manually.
Can I generate a QR code for a whole range at once? Yes, with the formula, drag the fill handle down. With an add-on, select the entire range and it will generate codes for each cell.
Does this work in Excel? Excel doesn’t have an IMAGE function that pulls from a URL (though Excel 365 has IMAGE). In Excel, you’d typically use a VBA macro or a third-party add-in to create QR codes. The formula approach is specific to Google Sheets.
Related
- Computer Shortcut Keys to Shut Down Windows
- Data Entry Bir 7.4? Meaning & How to Use It
- Shortcut for AutoSum in Excel (Windows & Mac)
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Where Is AutoFit in Excel? Find the Column and Row ToolsIn Excel for Microsoft 365 on Windows, AutoFit is on the Home tab: choose Home > Format in…
- Excel Data Analysis: Where to Find the OptionsExcel’s statistical Data Analysis option is the Analysis ToolPak. In Excel for Microsoft 365 on Windows, enable it…
- Excel Column Sorting Drop-Down: How to Use ItIn Excel for Microsoft 365 on Windows, click the arrow in a column header and choose Sort A…
- Merge Cells in Excel Without Losing Data: Safe StepsTo merge cells in Excel without losing their contents, first combine the contents in a helper cell with…
- Create a Brochure in Microsoft Word: Layout, Steps and TipsTo create a brochure in Microsoft Word, start with a brochure template or set up a blank document…
- Clear Outlook Roam Cache: Safe Steps and What ChangesTo clear Outlook’s Auto-Complete suggestions, open classic Outlook for Windows and select File > Options > Mail >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.