Excel Office QR Code Guide Using Google Charts API
GSheetLab Expert
Author
2026-06-05
Published
Learn how to create QR codes in Excel using the Google Charts API. Use simple formulas and examples to generate dynamic QR codes quickly — no plugins needed.
QR codes are now an important part of modern business, marketing, keeping track of inventory, and sharing data. Using a smartphone to scan a simple square code gives users instant access to information. QR codes make it easy to share data without having to type in long URLs, product details, or text.
The Google Charts API makes it easy to make QR codes right in your Excel spreadsheets. This method is easy, free, and doesn't need any extra software or complicated code.
This guide will show you how to use the Google Charts API to make QR codes in Excel, how the formula works, real-world uses, and advanced tips for making QR codes automatically.
What Is a QR Code in Excel?
A QR code, or Quick Response code, is a type of barcode that keeps track of things like URLs, text, product IDs, contact details, and email addresses. In Excel, QR codes are used to convert cell data into scannable images.
- A product ID in Excel can become a QR code
- A website link can be converted into a scannable QR
- Employee details can be encoded for quick access
What Is Google Charts API for QR Codes?
You can use the Google Charts API for free to make QR codes with a simple URL structure. It allows you to create QR codes dynamically by passing data into a URL.
- You send data to Google API
- Google returns a QR code image
- Excel displays it using the IMAGE function
QR Code Formula Using Google API in Excel
To generate a QR code in Excel, you use the following structure:
=IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & A2)- IMAGE() → displays the QR code image
- chart.googleapis.com → Google Charts API
- chs=150x150 → size of QR code
- cht=qr → tells API to generate QR code
- chl= → data to encode (from cell A2)
Step-by-Step: Create QR Code in Excel Using Google API
Step 1: Prepare Your Data
Create a simple table in Excel with a column for the data you want to convert into QR codes, such as URLs, product IDs, or text strings.
| A (Data) |
|---|
| https://example.com |
| Product123 |
| Hello, World! |
Step 2: Insert QR Code Formula
In column B, enter this formula:
=IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & A2)Step 3: Drag the Formula Down
Copy the formula for all rows. Now each cell in column B will display a unique QR code based on the value in column A.
How the Google API QR Code Works
When Excel sends a request like: https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello — Google returns a QR code image that encodes the word "Hello". The IMAGE() function in Excel then displays it inside the cell. This process happens in real time.
Benefits of Using Google API QR Codes in Excel
- No Add-ins Required: You don't need any third-party software.
- Free to Use: The Google Charts API is completely free for basic QR codes.
- Dynamic QR Codes: Change the data in Excel and the QR updates automatically.
- Easy Automation: Works perfectly with large datasets.
- Lightweight Solution: No heavy plugins or VBA required.
Real-Life Use Cases
- Inventory Management: Generate QR codes for each product ID.
- Marketing Campaigns: Create QR codes for landing pages or promotions.
- Business Cards: Store contact details in QR format.
- Event Management: Use QR codes for tickets and registrations.
- Education: Share notes or links with students via QR codes.
Advanced QR Code Customization
Change QR Code Size
Adjust the chs parameter to change the QR code dimensions:
=IMAGE("https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=" & A2)Encode URLs Properly
If your data contains spaces or special characters, use URL encoding to ensure accuracy:
=IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & ENCODEURL(A2))Handle Empty Cells
Add an IF condition to avoid errors when a cell is blank:
=IF(A2<>"", IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & A2), "")Common Errors and Fixes
| Error | Cause | Fix |
|---|---|---|
| QR Code Not Showing | Incorrect URL format | Check API link carefully |
| Broken QR Code | Special characters not encoded | Use ENCODEURL() |
| Empty Cell Error | Blank input data | Add IF condition to skip empty cells |
Limitations of Google Charts QR API
- Needs an internet connection to generate images
- Not an officially maintained modern Google API
- Limited customization options for styling
- No advanced branding features
Tips for Better QR Code Usage in Excel
- Always keep data clean and structured
- Use URL encoding for safety with special characters
- Adjust QR size for readability (larger for print)
- Test QR codes before printing or distributing
- Combine with Excel automation tools for bulk generation
Making QR codes in Excel with the Google Charts API is one of the easiest and quickest ways to automate your spreadsheets. With just one formula, you can turn any Excel data into a scannable QR code that updates dynamically.
Frequently Asked Questions
Did you find this helpful? Share it with your team.