Back to Blog
Tutorial
10 min read

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

ErrorCauseFix
QR Code Not ShowingIncorrect URL formatCheck API link carefully
Broken QR CodeSpecial characters not encodedUse ENCODEURL()
Empty Cell ErrorBlank input dataAdd 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

Use the Google Charts API with Excel's IMAGE function: =IMAGE("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=" & A2). Place your data (URL, text, product ID) in cell A2 and the formula generates a scannable QR code instantly — no plugins required.
Yes, you can use the Google Charts QR API for free to make basic QR codes. You don't need a subscription, API key, or authentication. It works directly through a URL request, making it ideal for personal projects, small business use, and internal tools.
No, QR codes made with the Google API require an internet connection because the QR image is fetched from an online API in real time. For offline use, consider Excel add-ins, VBA QR generators, or third-party desktop QR software.
Yes! Enter your data in column A, add the QR formula in column B, then drag the formula down for all rows. Each row generates a unique QR code automatically, making it perfect for inventory systems, student ID cards, product labeling, and attendance tracking.
Yes, QR codes automatically update when the cell data they reference changes. If A2 changes, the QR code updates instantly with no manual refresh needed. This makes it ideal for dynamic dashboards, live product data, and changing URLs.
Common causes include: no internet connection (the Google API requires online access), incorrect formula structure, empty cell reference (blank A2 produces no QR), special characters breaking the URL (use ENCODEURL()), or an older Excel version that doesn't support the IMAGE() function.
Yes, change the chs parameter in the formula. For example, chs=300x300 gives a larger, clearer QR code: =IMAGE("https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=" & A2). Larger sizes improve scan reliability, especially for printed documents.
No, VBA is not required for the Google Charts API method. This approach is formula-based, simple to use, and requires no coding. VBA may only be needed for offline QR generation or advanced custom styling.

Did you find this helpful? Share it with your team.