How to Easily Generate QR Codes in Google Sheets Using Formulas

Have you ever thought creating QR codes is challenging, especially when using tools or writing code?

With Google Sheets, you can easily generate QR codes using simple formulas.

In this guide, we’ll show you how to leverage a free QR code generation service that’s also available for commercial use.

TOC

Example Output

  • Enter the data you want to convert into a QR code in Column A.
  • Input the formula in Column B to generate the QR code.

The Formula to Generate a QR Code

(Example for input in cell B2)

=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & ENCODEURL(A2), 4, 150, 150)

Explanation of the Formula

https://api.qrserver.com/v1/create-qr-code/
  • The URL of a free QR code generation API.
size=150x150
  • Specify the QR code image size as 150×150 pixels.
data=
  • Specify the data to be included in the QR code.
ENCODEURL(A1)
  • URL-encode the data entered in cell A1 to safely pass it to the API.
IMAGEFunction Options
  • 4: Display the image with a custom size.
  • 150, 150: 150, 150: Fix the width and height to 150 pixels each.

What is a QR Code Generator (QR Code API)?

In this formula, we use the QR Code Generator(QR Code API) service provided by goQR.me.

The QR Code Generator is a web-based service that allows you to easily generate QR codes.

It has the following features:

Available for free:

An open QR code generation service that is also available for commercial use.

(The following statement is displayed on the QR Code Generator website:)

you can place and use the QR graphic on leaflets, posters, business cards or other products without any costs / for free (including commercial use).

Simple API structure:

You can create QR codes simply by adding text and size information to the URL.

High flexibility:

Capable of converting various data into QR codes, such as URLs, text, Wi-Fi settings, and email addresses.

Basic QR code generation is available for free, but paid plans enable tracking and analytics, making it useful for marketing purposes.

Steps to Create a QR Code

STEP
Enter the data.

Enter the data you want to generate a QR code for (e.g., URL, text, etc.) in Column A of the spreadsheet.

(The first row is the header row.)

STEP
Enter the formula.

Enter the previously mentioned formula in Column B (e.g., cell B2).

=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=" & ENCODEURL(A2), 4, 150, 150)

Copy the formula to the rows below as needed.

STEP
The Qr Code Is Generated.

The QR codes will be generated in Column B.

When you edit the data in Column A, the corresponding QR code will be updated automatically.

How to Download QR Code Images

STEP
Download the file as a web page (.html).

From the menu, select [File] > [Download] > [Web Page (.html)].

This action downloads the entire spreadsheet in HTML format.

STEP
Open the Downloaded HTML File

When you open the downloaded HTML file, the QR codes will be displayed.

STEP
Save a Specific QR Code Image

Right-click on the QR Code image that opens in your browser.

Select “Save Image As.”

An image of only the selected QR code will be downloaded.


You can also open the URL in the formula:https://api.qrserver.com/v1/create-qr-code/?size=150×150&data=” & ENCODEURL(A2) to display the QR code.

Use Cases

It can be used for the following purposes, among others:

  • Product management:: 
     Convert product codes or product links into QR codes.
  • Event management:
     Convert event registration forms or venue directions URLs into QR codes.
  • Marketing:
     Distribute coupon codes or campaign pages as QR codes.
  • Streamlining administrative tasks:
    Encoding for inventory management or shipment tracking.

Things to Keep in Mind

Data encoding (converting to a format usable in a URL)

Even if special characters are included, they will be encoded using the ENCODEURL function.

QR Code Size

To change the size, you can modify size=150x150 to something like size=200x200.

Performance Issues

When creating a large number of QR codes, the output of the spreadsheet may become slower.

Summary

By using formulas in Google Sheets, you can easily generate QR codes.

By saving the generated QR codes as image files, you can use them in printed materials or digital documents.

In addition to the formula method introduced here, there are also ways to generate QR codes using Google extensions, which will be featured in the next article.

Our company offers support for improving work efficiency through the use of Google Apps Script.
If you need assistance with Google Apps Script customization or error resolution, please feel free to contact us.
We are fully committed to supporting your business improvements.

Contact us here

Let's share this post !

Comments

To comment

TOC